X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fcommands%2Frefreshmonitorcommand.cpp;h=384c79d694e4e14c717bb5ec8203cc153ccdbaa9;hb=a3b7e870f1b6e72ec3a34d342dbdc03215780063;hp=8130bbb3f28f6322b670f4fd05bf1f8215ab997e;hpb=ffc86648981537b566a89ad63d57c5430b720829;p=kdenlive diff --git a/src/commands/refreshmonitorcommand.cpp b/src/commands/refreshmonitorcommand.cpp index 8130bbb3..384c79d6 100644 --- a/src/commands/refreshmonitorcommand.cpp +++ b/src/commands/refreshmonitorcommand.cpp @@ -22,10 +22,11 @@ #include "customtrackview.h" -RefreshMonitorCommand::RefreshMonitorCommand(CustomTrackView *view, bool execute, QUndoCommand * parent) : +RefreshMonitorCommand::RefreshMonitorCommand(CustomTrackView *view, bool execute, bool refreshOnUndo, QUndoCommand * parent) : QUndoCommand(parent), m_view(view), - m_exec(execute) + m_exec(execute), + m_execOnUndo(refreshOnUndo) { } @@ -33,12 +34,12 @@ RefreshMonitorCommand::RefreshMonitorCommand(CustomTrackView *view, bool execute // virtual void RefreshMonitorCommand::undo() { - m_view->monitorRefresh(); + if (m_execOnUndo) m_view->monitorRefresh(); } // virtual void RefreshMonitorCommand::redo() { - if (m_exec) + if (m_exec && !m_execOnUndo) m_view->monitorRefresh(); m_exec = true; }