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