implement RangeMarkerBarDrag::abort

Conflicts:
	gtk2_ardour/editor_drag.cc
This commit is contained in:
Paul Davis 2015-02-05 18:20:53 -05:00
parent e6752fb729
commit 7644533103
2 changed files with 16 additions and 3 deletions

View File

@ -4507,6 +4507,15 @@ RangeMarkerBarDrag::RangeMarkerBarDrag (Editor* e, ArdourCanvas::Item* i, Operat
_drag_rect->set_outline_color (ARDOUR_UI::config()->color ("range drag rect"));
}
RangeMarkerBarDrag::~RangeMarkerBarDrag()
{
/* normal canvas items will be cleaned up when their parent group is deleted. But
this item is created as the child of a long-lived parent group, and so we
need to explicitly delete it.
*/
delete _drag_rect;
}
void
RangeMarkerBarDrag::start_grab (GdkEvent* event, Gdk::Cursor *)
{
@ -4714,9 +4723,12 @@ RangeMarkerBarDrag::finished (GdkEvent* event, bool movement_occurred)
}
void
RangeMarkerBarDrag::aborted (bool)
RangeMarkerBarDrag::aborted (bool movement_occured)
{
/* XXX: TODO */
if (movement_occured) {
_crect->hide ();
_drag_rect->hide ();
}
}
void

View File

@ -995,7 +995,8 @@ public:
};
RangeMarkerBarDrag (Editor *, ArdourCanvas::Item *, Operation);
~RangeMarkerBarDrag ();
void start_grab (GdkEvent *, Gdk::Cursor* c = 0);
void motion (GdkEvent *, bool);
void finished (GdkEvent *, bool);