@@ -855,6 +855,7 @@ TrimClipInCommand::TrimClipInCommand(MultitrackModel &model,
855
855
856
856
void TrimClipInCommand::redo ()
857
857
{
858
+ MAIN.filterController ()->pauseUndoTracking ();
858
859
if (m_rippleMarkers) {
859
860
// Remove and shift markers as appropriate
860
861
bool markersModified = false ;
@@ -911,16 +912,19 @@ void TrimClipInCommand::redo()
911
912
m_undoHelper->recordAfterState ();
912
913
m_redo = true ;
913
914
}
915
+ MAIN.filterController ()->resumeUndoTracking ();
914
916
}
915
917
916
918
void TrimClipInCommand::undo ()
917
919
{
918
920
LOG_DEBUG () << " trackIndex" << m_trackIndex << " clipIndex" << m_clipIndex << " delta" << m_delta;
919
921
Q_ASSERT (m_undoHelper);
922
+ MAIN.filterController ()->pauseUndoTracking ();
920
923
m_undoHelper->undoChanges ();
921
924
if (m_rippleMarkers && m_markerRemoveStart >= 0 ) {
922
925
m_markersModel.doReplace (m_markers);
923
926
}
927
+ MAIN.filterController ()->resumeUndoTracking ();
924
928
}
925
929
926
930
bool TrimClipInCommand::mergeWith (const QUndoCommand *other)
@@ -961,6 +965,7 @@ TrimClipOutCommand::TrimClipOutCommand(MultitrackModel &model,
961
965
962
966
void TrimClipOutCommand::redo ()
963
967
{
968
+ MAIN.filterController ()->pauseUndoTracking ();
964
969
if (m_rippleMarkers) {
965
970
// Remove and shift markers as appropriate
966
971
bool markersModified = false ;
@@ -1019,16 +1024,19 @@ void TrimClipOutCommand::redo()
1019
1024
m_undoHelper->recordAfterState ();
1020
1025
m_redo = true ;
1021
1026
}
1027
+ MAIN.filterController ()->resumeUndoTracking ();
1022
1028
}
1023
1029
1024
1030
void TrimClipOutCommand::undo ()
1025
1031
{
1026
1032
LOG_DEBUG () << " trackIndex" << m_trackIndex << " clipIndex" << m_clipIndex << " delta" << m_delta;
1027
1033
Q_ASSERT (m_undoHelper);
1034
+ MAIN.filterController ()->pauseUndoTracking ();
1028
1035
m_undoHelper->undoChanges ();
1029
1036
if (m_rippleMarkers && m_markerRemoveStart >= 0 ) {
1030
1037
m_markersModel.doReplace (m_markers);
1031
1038
}
1039
+ MAIN.filterController ()->resumeUndoTracking ();
1032
1040
}
1033
1041
1034
1042
bool TrimClipOutCommand::mergeWith (const QUndoCommand *other)
@@ -1262,9 +1270,11 @@ TrimTransitionInCommand::TrimTransitionInCommand(MultitrackModel &model,
1262
1270
void TrimTransitionInCommand::redo ()
1263
1271
{
1264
1272
if (m_redo) {
1273
+ MAIN.filterController ()->pauseUndoTracking ();
1265
1274
m_model.trimTransitionIn (m_trackIndex, m_clipIndex, m_delta);
1266
1275
if (m_notify && m_clipIndex >= 0 )
1267
1276
m_model.notifyClipIn (m_trackIndex, m_clipIndex);
1277
+ MAIN.filterController ()->resumeUndoTracking ();
1268
1278
} else {
1269
1279
m_redo = true ;
1270
1280
}
@@ -1274,9 +1284,11 @@ void TrimTransitionInCommand::undo()
1274
1284
{
1275
1285
LOG_DEBUG () << " trackIndex" << m_trackIndex << " clipIndex" << m_clipIndex << " delta" << m_delta;
1276
1286
if (m_clipIndex >= 0 ) {
1287
+ MAIN.filterController ()->pauseUndoTracking ();
1277
1288
m_model.trimTransitionIn (m_trackIndex, m_clipIndex, -m_delta);
1278
1289
m_model.notifyClipIn (m_trackIndex, m_clipIndex);
1279
1290
m_notify = true ;
1291
+ MAIN.filterController ()->resumeUndoTracking ();
1280
1292
} else
1281
1293
LOG_WARNING () << " invalid clip index" << m_clipIndex;
1282
1294
}
@@ -1311,9 +1323,11 @@ void TrimTransitionOutCommand::redo()
1311
1323
{
1312
1324
if (m_redo) {
1313
1325
LOG_DEBUG () << " trackIndex" << m_trackIndex << " clipIndex" << m_clipIndex;
1326
+ MAIN.filterController ()->pauseUndoTracking ();
1314
1327
m_model.trimTransitionOut (m_trackIndex, m_clipIndex, m_delta);
1315
1328
if (m_notify && m_clipIndex >= 0 )
1316
1329
m_model.notifyClipOut (m_trackIndex, m_clipIndex);
1330
+ MAIN.filterController ()->resumeUndoTracking ();
1317
1331
} else {
1318
1332
m_redo = true ;
1319
1333
}
@@ -1324,9 +1338,11 @@ void TrimTransitionOutCommand::undo()
1324
1338
if (m_clipIndex >= 0 ) {
1325
1339
LOG_DEBUG () << " trackIndex" << m_trackIndex << " clipIndex" << m_clipIndex << " delta"
1326
1340
<< m_delta;
1341
+ MAIN.filterController ()->pauseUndoTracking ();
1327
1342
m_model.trimTransitionOut (m_trackIndex, m_clipIndex, -m_delta);
1328
1343
m_model.notifyClipOut (m_trackIndex, m_clipIndex);
1329
1344
m_notify = true ;
1345
+ MAIN.filterController ()->resumeUndoTracking ();
1330
1346
} else
1331
1347
LOG_WARNING () << " invalid clip index" << m_clipIndex;
1332
1348
}
0 commit comments