add a fix for the one problem case from the last commit: region splitting, where...
authorPaul Davis <paul@linuxaudiosystems.com>
Sun, 27 May 2012 18:22:45 +0000 (18:22 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Sun, 27 May 2012 18:22:45 +0000 (18:22 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@12458 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/editor_ops.cc
libs/ardour/ardour/region_factory.h

index 7f4c22616ec0ac6a4a818962974d7a1a211e8c0a..de24266374c77296d5c7ba0bef7e8bda1792f37c 100644 (file)
@@ -5916,6 +5916,10 @@ Editor::split_region_at_points (boost::shared_ptr<Region> r, AnalysisFeatureList
                plist.add (ARDOUR::Properties::layer, 0);
 
                boost::shared_ptr<Region> nr = RegionFactory::create (r->sources(), plist, false);
+               /* because we set annouce to false, manually add the new region to the
+                  RegionFactory map
+               */
+               RegionFactory::map_add (nr);
 
                pl->add_region (nr, r->position() + pos);
 
@@ -5940,6 +5944,10 @@ Editor::split_region_at_points (boost::shared_ptr<Region> r, AnalysisFeatureList
        plist.add (ARDOUR::Properties::layer, 0);
 
        boost::shared_ptr<Region> nr = RegionFactory::create (r->sources(), plist, false);
+       /* because we set annouce to false, manually add the new region to the
+          RegionFactory map
+       */
+       RegionFactory::map_add (nr);
        pl->add_region (nr, r->position() + pos);
 
        if (select_new) {
index 80584e68595ade9dffe8f14fa029afdceba6f7ff..4ba261f80c8c3a3981f2236a42237471f326b750 100644 (file)
@@ -111,6 +111,13 @@ public:
 
        static void add_compound_association (boost::shared_ptr<Region>, boost::shared_ptr<Region>);
 
+       /* exposed because there may be cases where regions are created with
+        * announce=false but they still need to be in the map soon after
+        * creation.
+        */
+        
+       static void map_add (boost::shared_ptr<Region>);
+
   private:
 
        static void region_changed (PBD::PropertyChange const &, boost::weak_ptr<Region>);
@@ -118,7 +125,6 @@ public:
        static Glib::StaticMutex region_map_lock;
 
        static RegionMap region_map;
-       static void map_add (boost::shared_ptr<Region>);
 
        static Glib::StaticMutex region_name_map_lock;