diff options
author | Ben Loftis <ben@harrisonconsoles.com> | 2014-07-23 15:41:14 -0500 |
---|---|---|
committer | Ben Loftis <ben@harrisonconsoles.com> | 2014-07-23 15:41:14 -0500 |
commit | b29e324ee4b1b0d170adee4125d392c440d21d79 (patch) | |
tree | 96ab2a583586bccb3f0e05e90fd27d028b2cb4d5 /gtk2_ardour | |
parent | e85ff4dad26ef13b0351de0dfd92ce22022cd611 (diff) |
Mixer selection follows mouse
This eliminates ambiguity about which strip the keybindings will affect.
Hold shift to make a quick group from adjacent mixer strips.
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/mixer_actor.cc | 1 | ||||
-rw-r--r-- | gtk2_ardour/mixer_ui.cc | 12 | ||||
-rw-r--r-- | gtk2_ardour/mixer_ui.h | 1 |
3 files changed, 14 insertions, 0 deletions
diff --git a/gtk2_ardour/mixer_actor.cc b/gtk2_ardour/mixer_actor.cc index 090293612b..cd3d090dd6 100644 --- a/gtk2_ardour/mixer_actor.cc +++ b/gtk2_ardour/mixer_actor.cc @@ -172,6 +172,7 @@ MixerActor::unity_gain_action () { set_route_targets_for_operation (); +printf("setting gain to unity (?)"); BOOST_FOREACH(RouteUI* r, _route_targets) { boost::shared_ptr<Route> rp = r->route(); if (rp) { diff --git a/gtk2_ardour/mixer_ui.cc b/gtk2_ardour/mixer_ui.cc index e9c36690a6..b31c20df6e 100644 --- a/gtk2_ardour/mixer_ui.cc +++ b/gtk2_ardour/mixer_ui.cc @@ -392,6 +392,7 @@ Mixer_UI::add_strips (RouteList& routes) strip->WidthChanged.connect (sigc::mem_fun(*this, &Mixer_UI::strip_width_changed)); strip->signal_button_release_event().connect (sigc::bind (sigc::mem_fun(*this, &Mixer_UI::strip_button_release_event), strip)); + strip->signal_enter_notify_event().connect (sigc::bind (sigc::mem_fun(*this, &Mixer_UI::strip_enter_event), strip)); } } catch (...) { @@ -635,6 +636,17 @@ Mixer_UI::strip_by_route (boost::shared_ptr<Route> r) } bool +Mixer_UI::strip_enter_event (GdkEventCrossing *ev, MixerStrip *strip) +{ + if (Keyboard::modifier_state_equals (ev->state, Keyboard::TertiaryModifier)) { + _selection.add (strip); + } else + _selection.set (strip); + return false; +} + + +bool Mixer_UI::strip_button_release_event (GdkEventButton *ev, MixerStrip *strip) { if (ev->button == 1) { diff --git a/gtk2_ardour/mixer_ui.h b/gtk2_ardour/mixer_ui.h index e5d78f2218..a324888c86 100644 --- a/gtk2_ardour/mixer_ui.h +++ b/gtk2_ardour/mixer_ui.h @@ -249,6 +249,7 @@ class Mixer_UI : public Gtk::Window, public PBD::ScopedConnectionList, public AR void group_display_selection_changed (); bool strip_button_release_event (GdkEventButton*, MixerStrip*); + bool strip_enter_event (GdkEventCrossing*, MixerStrip*); Width _strip_width; |