@@ -171,7 +171,8 @@ class: AnnotateMinorMode : MinorMode
171171
172172 char _cursorChar ;
173173
174- int _hideDrawPane ;
174+ int _hideDrawPane ;
175+ bool _skipClearAllConfirmation ;
175176
176177 // filtering control based on time and dx/dy deltas during drag events
177178 // to prevent sending ridiculous number of mouse/tablet events if using
@@ -1651,27 +1652,28 @@ class: AnnotateMinorMode : MinorMode
16511652
16521653 method : clearAllSlot (void ; bool checked )
16531654 {
1654- let answer = alertPanel (true , InfoAlert , "Clear all annotations from the current timeline?" , nil , "OK" , "Cancel" , nil );
1655-
1656- if (answer != 0 )
1655+ if (!_skipClearAllConfirmation )
16571656 {
1658- return ;
1657+ let answer = alertPanel (true , InfoAlert , "Clear all annotations from the current timeline?" , nil , "OK" , "Cancel" , nil );
1658+
1659+ if (answer != 0 )
1660+ {
1661+ return ;
1662+ }
16591663 }
1660- else
1664+
1665+ for_each (node ; nodes ())
16611666 {
1662- for_each (node ; nodes ())
1667+ let annotatedFrames = findAnnotatedFrames (node );
1668+ for_each (frame ; annotatedFrames )
16631669 {
1664- let annotatedFrames = findAnnotatedFrames (node );
1665- for_each (frame ; annotatedFrames )
1666- {
1667- clearPaint (node , frame );
1668- clearPaint (node , sourceFrame (frame ));
1669- }
1670+ clearPaint (node , frame );
1671+ clearPaint (node , sourceFrame (frame ));
16701672 }
1671-
1672- updateFrameDependentState ();
1673- redraw ();
16741673 }
1674+
1675+ updateFrameDependentState ();
1676+ redraw ();
16751677 }
16761678
16771679 method : redoSlot (void ; bool checked )
@@ -2078,6 +2080,7 @@ class: AnnotateMinorMode : MinorMode
20782080 _hideDrawPane = 0 ;
20792081 _userSelectedNode = "" ;
20802082 _disabledTooltipMessage = "This tool is currently unavailable" ;
2083+ _skipClearAllConfirmation = system . getenv ("RV_ANNOTATE_SKIP_CLEAR_ALL_CONFIRMATION" , nil ) neq nil ;
20812084
20822085 let m = mainWindowWidget (),
20832086 g = QActionGroup (m );
0 commit comments