maybe fix copy-x-constrained drag issues; mix group buttons change text when mix...
authorPaul Davis <paul@linuxaudiosystems.com>
Wed, 28 Feb 2007 21:57:38 +0000 (21:57 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Wed, 28 Feb 2007 21:57:38 +0000 (21:57 +0000)
git-svn-id: svn://localhost/ardour2/trunk@1536 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/editor_mouse.cc
gtk2_ardour/mixer_ui.cc

index 23d1426ac3d874bb29960e7335cd087ba82e0e63..c11fde58c29db0989792a99cb5716b34bcab0b6c 100644 (file)
@@ -1521,18 +1521,11 @@ Editor::motion_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemType item
                if (!drag_info.move_threshold_passed) {
 
                        drag_info.move_threshold_passed = (abs ((int) (drag_info.current_pointer_x - drag_info.grab_x)) > 4);
-                       
-                       /* if we are dragging Regions we must also consider a change in track
-                       ** as passing the move threshold, otherwise e.g. copying regions to
-                       ** the same temporal position on a different track doesn't work.
-                       */
-                       if (drag_info.item_type == RegionItem && drag_info.data) {
-                               RegionView* rv = reinterpret_cast<RegionView *> (drag_info.data);
-                               if (drag_info.last_trackview != &rv->get_time_axis_view()) {
-                                       drag_info.move_threshold_passed = true;
-                               }
+
+                       if (drag_info.copy && !drag_info.move_threshold_passed) {
+                               drag_info.move_threshold_passed = (abs ((int) (drag_info.current_pointer_y - drag_info.grab_y)) > 4);
                        }
-                             
+
                        // and change the initial grab loc/frame if this drag info wants us to
 
                        if (drag_info.want_move_threshold && drag_info.move_threshold_passed) {
@@ -2837,7 +2830,12 @@ Editor::region_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
        vector<int32_t>  height_list(512) ;
        vector<int32_t>::iterator j;
 
-       if (drag_info.copy && drag_info.move_threshold_passed && drag_info.want_move_threshold) {
+       /* don't copy regions if we're doing x-constrained and we're in the same track, or
+          if we haven't passed the move threshold yet
+       */
+
+       if ((drag_info.x_constrained && (drag_info.last_trackview != &rv->get_time_axis_view())) &&
+            drag_info.copy && drag_info.move_threshold_passed && drag_info.want_move_threshold) {
 
                drag_info.want_move_threshold = false; // don't copy again
 
@@ -2867,7 +2865,6 @@ Editor::region_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
                        
                        latest_regionview = 0;
                        
-                       
                        /* create a new region with the same name. */
                        
                        // FIXME: ew.  need a (virtual) Region::duplicate() or something?
index f1f8714e80a44baf6a2d159fb8f3daf9fce1a147..39d753bf616b4afcd930758037adaf0f9d766a71 100644 (file)
@@ -896,6 +896,16 @@ Mixer_UI::group_flags_changed (void* src, RouteGroup* group)
        }
 
        ENSURE_GUI_THREAD(bind (mem_fun(*this, &Mixer_UI::group_flags_changed), src, group));
+
+       /* force an update of any mixer strips that are using this group,
+          otherwise mix group names don't change in mixer strips 
+       */
+
+       for (list<MixerStrip *>::iterator i = strips.begin(); i != strips.end(); ++i) {
+               if ((*i)->mix_group() == group) {
+                       (*i)->mix_group_changed(0);
+               }
+       }
        
        TreeModel::iterator i;
        TreeModel::Children rows = group_model->children();