Fix crash on zone undo

parent bf3ec045
Pipeline #17252 passed with stage
in 14 minutes and 27 seconds
...@@ -1148,15 +1148,11 @@ void TimelineController::updateZone(const QPoint oldZone, const QPoint newZone, ...@@ -1148,15 +1148,11 @@ void TimelineController::updateZone(const QPoint oldZone, const QPoint newZone,
std::function<bool(void)> undo = []() { return true; }; std::function<bool(void)> undo = []() { return true; };
std::function<bool(void)> redo = []() { return true; }; std::function<bool(void)> redo = []() { return true; };
Fun undo_zone = [this, oldZone]() { Fun undo_zone = [this, oldZone]() {
m_zone = oldZone; setZone(oldZone, false);
emit zoneChanged();
emit zoneMoved(oldZone);
return true; return true;
}; };
Fun redo_zone = [this, newZone]() { Fun redo_zone = [this, newZone]() {
m_zone = newZone; setZone(newZone, false);
emit zoneChanged();
emit zoneMoved(newZone);
return true; return true;
}; };
redo_zone(); redo_zone();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment