_editor->hide_verbose_canvas_cursor();
- update_selection ();
-
_ending = false;
return _had_movement;
_views.remove (v);
}
-void
-RegionDrag::update_selection ()
-{
- list<Selectable*> s;
- copy (_views.begin(), _views.end(), back_inserter (s));
- _editor->selection->set (s);
-}
-
RegionMotionDrag::RegionMotionDrag (Editor* e, ArdourCanvas::Item* i, RegionView* p, list<RegionView*> const & v, bool b)
: RegionDrag (e, i, p, v),
_dest_trackview (0),
}
void
-RegionMoveDrag::finished (GdkEvent* event, bool movement_occurred)
+RegionMoveDrag::finished (GdkEvent* /*event*/, bool movement_occurred)
{
bool nocommit = true;
vector<RegionView*> copies;
void
-RegionInsertDrag::finished (GdkEvent* event, bool movement_occurred)
+RegionInsertDrag::finished (GdkEvent* /*event*/, bool /*movement_occurred*/)
{
_editor->update_canvas_now ();
};
void
-RegionSpliceDrag::motion (GdkEvent* event, bool)
+RegionSpliceDrag::motion (GdkEvent* /*event*/, bool)
{
RouteTimeAxisView* tv;
layer_t layer;
}
void
-RegionSpliceDrag::finished (GdkEvent* event, bool)
+RegionSpliceDrag::finished (GdkEvent* /*event*/, bool)
{
}
void
-RegionCreateDrag::motion (GdkEvent* event, bool first_move)
+RegionCreateDrag::motion (GdkEvent* /*event*/, bool first_move)
{
if (first_move) {
// TODO: create region-create-drag region view here
void
-RegionGainDrag::motion (GdkEvent* event, bool)
+RegionGainDrag::motion (GdkEvent* /*event*/, bool)
{
}
void
-ControlPointDrag::start_grab (GdkEvent* event, Gdk::Cursor* cursor)
+ControlPointDrag::start_grab (GdkEvent* event, Gdk::Cursor* /*cursor*/)
{
Drag::start_grab (event, _editor->fader_cursor);
_point->line().end_drag (_point);
}
+bool
+ControlPointDrag::active (Editing::MouseMode m)
+{
+ if (m == Editing::MouseGain) {
+ /* always active in mouse gain */
+ return true;
+ }
+
+ /* otherwise active if the point is on an automation line (ie not if its on a region gain line) */
+ return dynamic_cast<AutomationLine*> (&(_point->line())) != 0;
+}
+
LineDrag::LineDrag (Editor* e, ArdourCanvas::Item* i)
: Drag (e, i),
_line (0),
}
void
-LineDrag::start_grab (GdkEvent* event, Gdk::Cursor* cursor)
+LineDrag::start_grab (GdkEvent* event, Gdk::Cursor* /*cursor*/)
{
_line = reinterpret_cast<AutomationLine*> (_item->get_data ("line"));
assert (_line);
}
void
-TimeFXDrag::finished (GdkEvent* event, bool movement_occurred)
+TimeFXDrag::finished (GdkEvent* /*event*/, bool movement_occurred)
{
_primary->get_time_axis_view().hide_timestretch ();
}
void
-ScrubDrag::motion (GdkEvent* event, bool)
+ScrubDrag::motion (GdkEvent* /*event*/, bool)
{
_editor->scrub ();
}
void
-ScrubDrag::finished (GdkEvent* event, bool movement_occurred)
+ScrubDrag::finished (GdkEvent* /*event*/, bool movement_occurred)
{
if (movement_occurred && _editor->session) {
/* make sure we stop */
if (movement_occurred) {
motion (event, false);
+ _drag_rect->hide();
switch (_operation) {
case CreateRangeMarker:
XMLNode &after = _editor->session->locations()->get_state();
_editor->session->add_command(new MementoCommand<Locations>(*(_editor->session->locations()), &before, &after));
_editor->commit_reversible_command ();
-
- _drag_rect->hide();
break;
}
case CreateTransportMarker:
// popup menu to pick loop or punch
_editor->new_transport_marker_context_menu (&event->button, _item);
-
break;
}
} else {