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.
This commit is contained in:
Ben Loftis
2014-07-23 15:41:14 -05:00
parent e85ff4dad2
commit b29e324ee4
3 changed files with 14 additions and 0 deletions

View File

@@ -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) {

View File

@@ -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 (...) {
@@ -634,6 +635,17 @@ Mixer_UI::strip_by_route (boost::shared_ptr<Route> r)
return 0;
}
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)
{

View File

@@ -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;