From 826bea3c3002fc5d04a9e1e13fb1e8cbb4886f6e Mon Sep 17 00:00:00 2001 From: Jonathan Moore Liles Date: Fri, 1 Jan 2021 18:19:10 -0800 Subject: [PATCH] Timeline: Fix rare issue where moving the mouse over a region while recording at just the right moment could cause a spurious SET action to be written to the history. --- timeline/src/Audio_Region.C | 4 ++++ timeline/src/Sequence_Region.C | 5 +++++ timeline/src/Sequence_Widget.C | 4 ++++ timeline/src/Track.C | 5 ++++- 4 files changed, 17 insertions(+), 1 deletion(-) diff --git a/timeline/src/Audio_Region.C b/timeline/src/Audio_Region.C index 3aca628..af9ad96 100644 --- a/timeline/src/Audio_Region.C +++ b/timeline/src/Audio_Region.C @@ -822,6 +822,10 @@ Audio_Region::handle ( int m ) static bool copied = false; static nframes_t os; + if ( !active_r() ) + /* don't mess with anything while recording... */ + return 0; + int X = Fl::event_x(); int Y = Fl::event_y(); diff --git a/timeline/src/Sequence_Region.C b/timeline/src/Sequence_Region.C index 868bc8f..da4be8b 100644 --- a/timeline/src/Sequence_Region.C +++ b/timeline/src/Sequence_Region.C @@ -19,6 +19,7 @@ #include "Sequence_Region.H" #include "Track.H" +#include "debug.h" #include @@ -142,6 +143,10 @@ Sequence_Region::handle ( int m ) int X = Fl::event_x(); int Y = Fl::event_y(); + if ( !active_r() ) + /* don't mess with anything while recording... */ + return 0; + Logger _log( this ); switch ( m ) diff --git a/timeline/src/Sequence_Widget.C b/timeline/src/Sequence_Widget.C index ea9a858..5784e33 100644 --- a/timeline/src/Sequence_Widget.C +++ b/timeline/src/Sequence_Widget.C @@ -391,6 +391,10 @@ Sequence_Widget::handle ( int m ) int X = Fl::event_x(); int Y = Fl::event_y(); + if ( !active_r() ) + /* don't mess with anything while recording... */ + return 0; + Logger _log( this ); switch ( m ) diff --git a/timeline/src/Track.C b/timeline/src/Track.C index 362ffba..0873d8c 100644 --- a/timeline/src/Track.C +++ b/timeline/src/Track.C @@ -1059,7 +1059,10 @@ Track::draw ( void ) int Track::handle ( int m ) { - + if ( !active_r() ) + /* don't mess with anything while recording... */ + return 0; + /* if ( m != FL_NO_EVENT ) */ /* DMESSAGE( "%s", event_name( m ) ); */ static Fl_Widget *dragging = NULL;