[Summary] Blocked redundant skip marker (during skip ranges consolidation) updates...
authorGZharun <grygoriiz@wavesglobal.com>
Sat, 7 Feb 2015 19:36:47 +0000 (21:36 +0200)
committerPaul Davis <paul@linuxaudiosystems.com>
Tue, 17 Feb 2015 15:57:56 +0000 (10:57 -0500)
Conflicts:
libs/ardour/ardour/session.h
libs/ardour/session.cc

libs/ardour/ardour/session.h
libs/ardour/session.cc

index e45036a09456816967d09884c1ca229d572613f7..8d5e439129c6136595529c3aed7c8b0ad808ed5d 100644 (file)
@@ -1196,9 +1196,7 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
        void sync_locations_to_skips ();
        void _sync_locations_to_skips ();
     
-       PBD::ScopedConnectionList loop_update_connections;
-       PBD::ScopedConnectionList mark_update_connections;
-       PBD::ScopedConnectionList skip_update_connections;
+       bool _ignore_skips_updates;
 
        PBD::ScopedConnectionList punch_connections;
        void             auto_punch_start_changed (Location *);
index 1c6b08b95d81adb047b58d327a09299e4148614e..c21b5254b4912fa0ae64e747bbc64019bda963c9 100644 (file)
@@ -208,6 +208,7 @@ Session::Session (AudioEngine &eng,
        , _post_transport_work (0)
        ,  cumulative_rf_motion (0)
        , rf_scale (1.0)
+    , _ignore_skips_updates (false)
        , _locations (new Locations (*this))
        , step_speed (0)
        , outbound_mtc_timecode_frame (0)
@@ -1325,11 +1326,16 @@ Session::update_marks (Location*)
 void
 Session::update_skips (Location* loc, bool consolidate)
 {
+    if (_ignore_skips_updates) {
+        return;
+    }
+    
        Locations::LocationList skips;
 
-       if (consolidate) {
-               consolidate_skips (loc);
-       }
+        if (consolidate) {
+               PBD::Unwinder<bool> uw (_ignore_skips_updates, true);
+               consolidate_skips (loc);
+        }
 
        sync_locations_to_skips ();