Add 'controls' item to plugin insert context menu to always show Ardour generated...
[ardour.git] / gtk2_ardour / editor_drag.cc
index ed821c8f151a491e6ba36294a3fe58e451d4c55a..1784e59944ad0ab13ba5d4a6290115857dc37811 100644 (file)
@@ -92,9 +92,11 @@ DragManager::abort ()
                delete *i;
        }
 
-       _drags.clear ();
+       if (!_drags.empty ()) {
+               _editor->set_follow_playhead (_old_follow_playhead, false);
+       }
 
-       _editor->set_follow_playhead (_old_follow_playhead, false);
+       _drags.clear ();
        
        _ending = false;
 }
@@ -369,27 +371,27 @@ Drag::show_verbose_cursor_time (framepos_t frame)
 }
 
 void
-Drag::show_verbose_cursor_duration (framepos_t start, framepos_t end)
+Drag::show_verbose_cursor_duration (framepos_t start, framepos_t end, double xoffset)
 {
+       _editor->verbose_cursor()->show (xoffset);
+       
        _editor->verbose_cursor()->set_duration (
                start, end,
                _drags->current_pointer_x() + 10 - _editor->horizontal_position(),
                _drags->current_pointer_y() + 10 - _editor->vertical_adjustment.get_value() + _editor->canvas_timebars_vsize
                );
-
-       _editor->verbose_cursor()->show ();
 }
 
 void
 Drag::show_verbose_cursor_text (string const & text)
 {
+       _editor->verbose_cursor()->show ();
+       
        _editor->verbose_cursor()->set (
                text,
                _drags->current_pointer_x() + 10 - _editor->horizontal_position(),
                _drags->current_pointer_y() + 10 - _editor->vertical_adjustment.get_value() + _editor->canvas_timebars_vsize
                );
-
-       _editor->verbose_cursor()->show ();
 }
 
 
@@ -869,9 +871,9 @@ RegionMoveDrag::finished_copy (bool const changed_position, bool const /*changed
        }
 
        if (_x_constrained) {
-               _editor->begin_reversible_command (_("fixed time region copy"));
+               _editor->begin_reversible_command (Operations::fixed_time_region_copy);
        } else {
-               _editor->begin_reversible_command (_("region copy"));
+               _editor->begin_reversible_command (Operations::region_copy);
        }
 
        /* insert the regions into their new playlists */
@@ -2165,7 +2167,7 @@ FadeInDrag::start_grab (GdkEvent* event, Gdk::Cursor* cursor)
        AudioRegionView* arv = dynamic_cast<AudioRegionView*> (_primary);
        boost::shared_ptr<AudioRegion> const r = arv->audio_region ();
 
-       show_verbose_cursor_duration (r->position(), r->position() + r->fade_in()->back()->when);
+       show_verbose_cursor_duration (r->position(), r->position() + r->fade_in()->back()->when, 32);
        
        arv->show_fade_line((framepos_t) r->fade_in()->back()->when);
 }
@@ -2207,7 +2209,7 @@ FadeInDrag::motion (GdkEvent* event, bool)
                tmp->show_fade_line((framecnt_t) fade_length);
        }
 
-       show_verbose_cursor_duration (region->position(), region->position() + fade_length);
+       show_verbose_cursor_duration (region->position(), region->position() + fade_length, 32);
 }
 
 void
@@ -3184,8 +3186,6 @@ TimeFXDrag::finished (GdkEvent* /*event*/, bool movement_occurred)
        }
 #endif
 
-       _editor->begin_reversible_command (_("timestretch"));
-
        // XXX how do timeFX on multiple regions ?
 
        RegionSelection rs;