mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 00:34:59 +01:00
tweaks to pianoroll GUI to control capture length and avoid track rec-enabling
Tracks cannot be rec-enabled at the same as clips/slots/cues/triggers are rec-enabled. This means that the "rec-enable" button in a TriggerStrip should not be setting track record enabled status. Instead, it is a GUI-only button that causes a redraw with the appropriate slot icons (play, record) Still a bit of work to be done here but functional again and avoids an assert() failure
This commit is contained in:
parent
bb2812f272
commit
1e7480665c
4 changed files with 55 additions and 11 deletions
|
|
@ -149,7 +149,14 @@ TriggerStrip::init ()
|
|||
mute_solo_table.set_spacings (2);
|
||||
mute_solo_table.attach (*mute_button, 0, 1, 0, 1);
|
||||
mute_solo_table.attach (*solo_button, 1, 2, 0, 1);
|
||||
mute_solo_table.attach (*rec_enable_button, 0, 2, 1, 2);
|
||||
|
||||
rec_toggle_button = manage (new ArdourButton);
|
||||
rec_toggle_button->set_name ("record enable button");
|
||||
rec_toggle_button->set_icon (ArdourIcon::RecButton);
|
||||
UI::instance()->set_tip (rec_toggle_button, _("Switch controls from cue launching to cue recording"), "");
|
||||
rec_toggle_button->show ();
|
||||
rec_toggle_button->signal_button_press_event().connect (sigc::mem_fun(*this, &TriggerStrip::rec_toggle_press), false);
|
||||
mute_solo_table.attach (*rec_toggle_button, 0, 2, 1, 2);
|
||||
|
||||
volume_table.attach (_level_meter, 0, 1, 0, 1);
|
||||
/*Note: _gain_control is added in set_route */
|
||||
|
|
@ -195,6 +202,22 @@ TriggerStrip::init ()
|
|||
set_size_request (width, -1);
|
||||
}
|
||||
|
||||
bool
|
||||
TriggerStrip::rec_toggle_press (GdkEventButton* ev)
|
||||
{
|
||||
if (!_route) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!_route->triggerbox()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
_route->triggerbox()->set_record_enabled (!_route->triggerbox()->record_enabled());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
TriggerStrip::set_route (std::shared_ptr<Route> rt)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue