implement RangeMarkerBarDrag::abort

This commit is contained in:
Paul Davis 2015-02-05 18:20:53 -05:00
parent a0482157a7
commit 31e6f73bd3
2 changed files with 16 additions and 3 deletions

View file

@ -4479,6 +4479,15 @@ RangeMarkerBarDrag::RangeMarkerBarDrag (Editor* e, ArdourCanvas::Item* i, Operat
DEBUG_TRACE (DEBUG::Drags, "New RangeMarkerBarDrag\n");
}
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 *)
{
@ -4648,9 +4657,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 ();
}
}
MouseZoomDrag::MouseZoomDrag (Editor* e, ArdourCanvas::Item* i)

View file

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