summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2014-02-19 13:15:33 -0500
committerPaul Davis <paul@linuxaudiosystems.com>2014-02-19 13:22:52 -0500
commitaa7a259fd369b506a7c39fd83309dad153823ed1 (patch)
tree14763a7f51c5ea24b4c26983d2f84f3e2c924472
parent1d82f4ca07a38342e0815cd6b695b96d72386f39 (diff)
add a hack to deal with device discovery race, in which the devices were not actually known to be ready before the last update_surfaces() call (which is where binding between strips and routes occurs) ; add support for Mackie Control touch on/off messages
-rw-r--r--gtk2_ardour/editor_drag.cc21
1 files changed, 18 insertions, 3 deletions
diff --git a/gtk2_ardour/editor_drag.cc b/gtk2_ardour/editor_drag.cc
index a7060dd433..efa98997b0 100644
--- a/gtk2_ardour/editor_drag.cc
+++ b/gtk2_ardour/editor_drag.cc
@@ -3275,10 +3275,25 @@ LineDrag::motion (GdkEvent* event, bool)
}
void
-LineDrag::finished (GdkEvent* event, bool)
+LineDrag::finished (GdkEvent* event, bool movement_occured)
{
- motion (event, false);
- _line->end_drag (false, 0);
+ if (movement_occured) {
+ motion (event, false);
+ _line->end_drag (false, 0);
+ } else {
+ /* add a new control point on the line */
+
+ AutomationTimeAxisView* atv;
+
+ _line->end_drag (false, 0);
+
+ if ((atv = dynamic_cast<AutomationTimeAxisView*>(_editor->clicked_axisview)) != 0) {
+ framepos_t where = _editor->event_frame (event, 0, 0);
+ std::cerr << "Add new point @ " << where << ", " << _drags->current_pointer_y() << std::endl;
+ atv->add_automation_event (event, where, _drags->current_pointer_y(), false);
+ }
+ }
+
_editor->session()->commit_reversible_command ();
}