@@ -61,11 +61,11 @@ void Keyframe::prepareActual()
6161{
6262 if (Gen::Plot::dimensionMatch (*source, *target)) {
6363 if (Gen::Plot::hasMarkerChange (*source, *target))
64- copyTarget ();
64+ copySourceTarget ();
6565 Gen::Plot::mergeMarkersAndCellInfo (*source, *target);
6666 }
6767 else {
68- copyTarget ();
68+ copySourceTarget ();
6969 target->prependMarkers (*source);
7070 source->appendMarkers (*targetCopy);
7171 }
@@ -80,7 +80,7 @@ void Keyframe::prepareActualMarkersInfo()
8080{
8181 const auto &origTMI = target->getMarkersInfo ();
8282 auto &smi = source->getMarkersInfo ();
83- if (!smi.empty ()) copyTarget ();
83+ if (!smi.empty ()) copySourceTarget ();
8484
8585 for (auto &tmi = target->getMarkersInfo (); auto &&item : smi)
8686 tmi.insert (std::pair{item.first , Gen::Plot::MarkerInfo{}});
@@ -89,14 +89,20 @@ void Keyframe::prepareActualMarkersInfo()
8989 smi.insert (std::pair{item.first , Gen::Plot::MarkerInfo{}});
9090}
9191
92- void Keyframe::copyTarget ()
92+ void Keyframe::copySourceTarget ()
9393{
9494 if (!targetCopy) {
9595 targetCopy = target;
9696 target = std::make_shared<Gen::Plot>(*targetCopy);
9797 target->getStyle ().setup ();
9898 target->detachOptions ();
9999 }
100+ if (!sourceCopy) {
101+ sourceCopy = source;
102+ source = std::make_shared<Gen::Plot>(*sourceCopy);
103+ source->getStyle ().setup ();
104+ source->detachOptions ();
105+ }
100106}
101107
102108}
0 commit comments