summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2014-07-07 08:26:37 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2014-07-07 08:26:37 -0400
commita34861c38ec4df77c1bd74b5d3fb63d9baf09719 (patch)
treedf9e5326b6e04817929ee49d05c483756b8bf091 /gtk2_ardour
parent4685a15b1fda18046a11473cd89854ddd96b5c51 (diff)
use an EditorCursor when dragging in cut mode to indicate cut position
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/editor_drag.cc10
-rw-r--r--gtk2_ardour/editor_drag.h5
2 files changed, 15 insertions, 0 deletions
diff --git a/gtk2_ardour/editor_drag.cc b/gtk2_ardour/editor_drag.cc
index ca41fa35ce..10968d1cfb 100644
--- a/gtk2_ardour/editor_drag.cc
+++ b/gtk2_ardour/editor_drag.cc
@@ -94,6 +94,8 @@ DragManager::abort ()
{
_ending = true;
+ cerr << "Aborting drag\n";
+
for (list<Drag*>::const_iterator i = _drags.begin(); i != _drags.end(); ++i) {
(*i)->abort ();
delete *i;
@@ -5449,18 +5451,26 @@ CrossfadeEdgeDrag::aborted (bool)
RegionCutDrag::RegionCutDrag (Editor* e, ArdourCanvas::Item* item)
: Drag (e, item, true)
+ , line (new EditorCursor (*e))
{
+ line->set_position (_editor->get_preferred_edit_position());
+}
+RegionCutDrag::~RegionCutDrag ()
+{
+ delete line;
}
void
RegionCutDrag::motion (GdkEvent*, bool)
{
+ line->set_position (_drags->current_pointer_frame());
}
void
RegionCutDrag::finished (GdkEvent*, bool)
{
+ line->hide ();
_editor->split_region ();
}
diff --git a/gtk2_ardour/editor_drag.h b/gtk2_ardour/editor_drag.h
index b704b0f357..bf04995309 100644
--- a/gtk2_ardour/editor_drag.h
+++ b/gtk2_ardour/editor_drag.h
@@ -445,9 +445,14 @@ class RegionCutDrag : public Drag
{
public:
RegionCutDrag (Editor*, ArdourCanvas::Item*);
+ ~RegionCutDrag ();
+
void motion (GdkEvent*, bool);
void finished (GdkEvent*, bool);
void aborted (bool);
+
+ private:
+ EditorCursor* line;
};
/** Drags to create regions */