@@ -156,10 +156,12 @@ void SpikeDisplayCanvas::update()
156156
157157 if (cache->hasCachedDisplaySettings (cacheKey))
158158 {
159+ LOGD (" SpikeDisplayCanvas::update: found exact key for " , cacheKey);
159160 applyCachedDisplaySettings (i, cacheKey);
160161 }
161162 else if (cache->findSimilarKey (cacheKey, streamIdx).size () > 0 )
162163 {
164+ LOGD (" SpikeDisplayCanvas::update: found similar key for " , cacheKey);
163165 applyCachedDisplaySettings (i, cache->findSimilarKey (cacheKey, streamIdx));
164166 }
165167 }
@@ -253,9 +255,11 @@ void SpikeDisplayCanvas::saveCustomParametersToXml(XmlElement* xml)
253255
254256 XmlElement* plotNode = xmlNode->createNewChildElement (" PLOT" );
255257
256- plotNode->setAttribute (" name" , spikeChannel->getName ());
257- plotNode->setAttribute (" stream_name" , processor->getDataStream (streamId)->getName ());
258258 plotNode->setAttribute (" stream_source" , processor->getDataStream (streamId)->getSourceNodeId ());
259+ plotNode->setAttribute (" stream_name" , processor->getDataStream (streamId)->getName ());
260+ plotNode->setAttribute (" source_node" , spikeChannel->getSourceNodeId ());
261+ plotNode->setAttribute (" name" , spikeChannel->getName ());
262+
259263 plotNode->setAttribute (" isMonitored" , spikeDisplay->getMonitorStateForPlot (i));
260264
261265 for (int j = 0 ; j < spikeDisplay->getNumChannelsForPlot (i); j++)
@@ -273,7 +277,6 @@ void SpikeDisplayCanvas::saveCustomParametersToXml(XmlElement* xml)
273277void SpikeDisplayCanvas::loadCustomParametersFromXml (XmlElement* xml)
274278{
275279
276-
277280 for (auto * xmlNode : xml->getChildIterator ())
278281 {
279282 if (xmlNode->hasTagName (" SPIKEDISPLAY" ))
@@ -298,11 +301,12 @@ void SpikeDisplayCanvas::loadCustomParametersFromXml(XmlElement* xml)
298301 {
299302 plotIndex++;
300303
301- std::string source = plotNode->getStringAttribute (" stream_source" ).toStdString ();
304+ std::string stream_source = plotNode->getStringAttribute (" stream_source" ).toStdString ();
302305 std::string stream_name = plotNode->getStringAttribute (" stream_name" ).toStdString ();
306+ std::string source = plotNode->getStringAttribute (" source_node" ).toStdString ();
303307 std::string name = plotNode->getStringAttribute (" name" ).toStdString ();
304308
305- std::string cacheKey = source + " |" + stream_name + " |" + name;
309+ std::string cacheKey = stream_source + " |" + stream_name + " | " + source + " |" + name;
306310
307311 cache->setMonitor (cacheKey, plotNode->getBoolAttribute (" isMonitored" ));
308312
0 commit comments