13
0

gain controls: tenatively use new "use selection" feature

This commit is contained in:
Paul Davis 2023-07-26 13:39:05 -06:00
parent 5f55f32386
commit d7ed491f75
2 changed files with 14 additions and 0 deletions

View File

@ -34,6 +34,7 @@
#include <gtkmm/style.h>
#include "ardour/amp.h"
#include "ardour/control_group.h"
#include "ardour/logmeter.h"
#include "ardour/route_group.h"
#include "ardour/session_route.h"
@ -754,6 +755,12 @@ GainMeterBase::meter_point_clicked (MeterPoint mp)
void
GainMeterBase::amp_start_touch (int state)
{
if (state & Keyboard::UseSelectionModifier) {
_touch_control_group.reset (new GainControlGroup ());
_touch_control_group->fill_from_selection (_control->session().selection());
_touch_control_group->push (_control);
}
_control->start_touch (timepos_t (_control->session().transport_sample()));
}
@ -761,6 +768,10 @@ void
GainMeterBase::amp_stop_touch (int state)
{
_control->stop_touch (timepos_t (_control->session().transport_sample()));
if (_touch_control_group) {
_touch_control_group->pop (_control);
_touch_control_group.reset ();
}
effective_gain_display ();
}

View File

@ -55,6 +55,7 @@
namespace ARDOUR {
class IO;
class ControlGroup;
class GainControl;
class Session;
class Route;
@ -189,6 +190,8 @@ protected:
void amp_stop_touch (int);
void amp_start_touch (int);
std::shared_ptr<ARDOUR::ControlGroup> _touch_control_group;
void set_route_group_meter_point (ARDOUR::Route&, ARDOUR::MeterPoint);
void set_meter_point (ARDOUR::Route&, ARDOUR::MeterPoint);
gint meter_press (GdkEventButton*);