mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-21 04:45:58 +01:00
bring some rationality to the pianoroll (clip) rec-enable button
This commit is contained in:
parent
ecf9e9e368
commit
757398a209
2 changed files with 31 additions and 9 deletions
|
|
@ -674,6 +674,32 @@ CueEditor::trigger_arm_change ()
|
|||
} else {
|
||||
maybe_set_count_in ();
|
||||
}
|
||||
|
||||
setup_record_blink ();
|
||||
}
|
||||
|
||||
void
|
||||
CueEditor::setup_record_blink ()
|
||||
{
|
||||
rec_blink_connection.disconnect ();
|
||||
|
||||
switch (ref.box()->record_enabled()) {
|
||||
case Recording:
|
||||
rec_enable_button.set_active_state (Gtkmm2ext::ExplicitActive);
|
||||
rec_blink_connection.disconnect ();
|
||||
break;
|
||||
case Enabled:
|
||||
if (!UIConfiguration::instance().get_no_strobe() && ref.trigger()->armed()) {
|
||||
rec_blink_connection = Timers::blink_connect (sigc::mem_fun (*this, &CueEditor::blink_rec_enable));
|
||||
} else {
|
||||
rec_enable_button.set_active_state (Gtkmm2ext::Off);
|
||||
}
|
||||
break;
|
||||
case Disabled:
|
||||
rec_enable_button.set_active_state (Gtkmm2ext::Off);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -685,28 +711,21 @@ CueEditor::rec_enable_change ()
|
|||
return;
|
||||
}
|
||||
|
||||
rec_blink_connection.disconnect ();
|
||||
count_in_connection.disconnect ();
|
||||
setup_record_blink ();
|
||||
|
||||
switch (ref.box()->record_enabled()) {
|
||||
case Recording:
|
||||
rec_enable_button.set_active_state (Gtkmm2ext::ExplicitActive);
|
||||
rec_blink_connection.disconnect ();
|
||||
begin_write ();
|
||||
break;
|
||||
case Enabled:
|
||||
if (!UIConfiguration::instance().get_no_strobe() && ref.trigger()->armed()) {
|
||||
rec_blink_connection = Timers::blink_connect (sigc::mem_fun (*this, &CueEditor::blink_rec_enable));
|
||||
} else {
|
||||
rec_enable_button.set_active_state (Gtkmm2ext::Off);
|
||||
}
|
||||
maybe_set_count_in ();
|
||||
break;
|
||||
case Disabled:
|
||||
rec_enable_button.set_active_state (Gtkmm2ext::Off);
|
||||
hide_count_in ();
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -1301,6 +1320,8 @@ CueEditor::set_trigger (TriggerReference& tref)
|
|||
set_region (nullptr);
|
||||
_update_connection = Timers::super_rapid_connect (sigc::mem_fun (*this, &CueEditor::maybe_update));
|
||||
}
|
||||
|
||||
setup_record_blink ();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -218,6 +218,7 @@ class CueEditor : public EditingContext, public PBD::HistoryOwner
|
|||
bool rec_button_press (GdkEventButton*);
|
||||
virtual void rec_enable_change ();
|
||||
void blink_rec_enable (bool);
|
||||
void setup_record_blink ();
|
||||
sigc::connection rec_blink_connection;
|
||||
|
||||
sigc::connection _update_connection;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue