mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-04 04:39:33 +01:00
better handling of trigger rec-enable display mgmt
May still want blink on the trigger strip rec-toggle button
This commit is contained in:
parent
fc31513bbe
commit
e505ca82ce
4 changed files with 27 additions and 26 deletions
|
|
@ -902,19 +902,6 @@ Pianoroll::idle_data_captured ()
|
|||
return false;
|
||||
}
|
||||
|
||||
void
|
||||
Pianoroll::box_rec_enable_change (ARDOUR::TriggerBox const & b)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
Pianoroll::trigger_rec_enable_change (ARDOUR::Trigger const & t)
|
||||
{
|
||||
if (!t.armed()) {
|
||||
view->end_write ();
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
Pianoroll::button_press_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_type)
|
||||
{
|
||||
|
|
@ -2167,6 +2154,20 @@ Pianoroll::blink_rec_enable (bool onoff)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
Pianoroll::trigger_arm_change ()
|
||||
{
|
||||
if (!ref.trigger()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!ref.trigger()->armed()) {
|
||||
view->end_write ();
|
||||
}
|
||||
|
||||
rec_enable_change ();
|
||||
}
|
||||
|
||||
void
|
||||
Pianoroll::rec_enable_change ()
|
||||
{
|
||||
|
|
@ -2179,13 +2180,11 @@ Pianoroll::rec_enable_change ()
|
|||
|
||||
switch (ref.box()->record_enabled()) {
|
||||
case Recording:
|
||||
std::cerr << "recording now active\n";
|
||||
rec_enable_button.set_active_state (Gtkmm2ext::ExplicitActive);
|
||||
rec_blink_connection.disconnect ();
|
||||
break;
|
||||
case Enabled:
|
||||
std::cerr << "maybe connect to blink, armed ? " << ref.trigger()->armed() << std::endl;
|
||||
if (!UIConfiguration::instance().get_no_strobe() && ref.trigger()->armed()) {
|
||||
std::cerr << "connect to blink\n";
|
||||
rec_blink_connection = Timers::blink_connect (sigc::mem_fun (*this, &Pianoroll::blink_rec_enable));
|
||||
} else {
|
||||
rec_enable_button.set_active_state (Gtkmm2ext::Off);
|
||||
|
|
@ -2215,8 +2214,6 @@ Pianoroll::maybe_set_count_in ()
|
|||
return;
|
||||
}
|
||||
|
||||
std::cerr << "Going to start at " << count_in_to << std::endl;
|
||||
|
||||
samplepos_t audible (_session->audible_sample());
|
||||
Temporal::Beats const & a_q (tmap->quarters_at_sample (audible));
|
||||
|
||||
|
|
@ -2353,6 +2350,10 @@ Pianoroll::rec_button_press (GdkEventButton* ev)
|
|||
void
|
||||
Pianoroll::set (TriggerReference & tref)
|
||||
{
|
||||
if (tref.trigger() == ref.trigger()) {
|
||||
return;
|
||||
}
|
||||
|
||||
_update_connection.disconnect ();
|
||||
object_connections.drop_connections ();
|
||||
|
||||
|
|
@ -2366,7 +2367,7 @@ Pianoroll::set (TriggerReference & tref)
|
|||
ref.box()->Captured.connect (object_connections, invalidator (*this), std::bind (&Pianoroll::data_captured, this, _1), gui_context());
|
||||
/* Don't bind a shared_ptr<TriggerBox> within the lambda */
|
||||
TriggerBox* tb (ref.box().get());
|
||||
tb->RecEnableChanged.connect (object_connections, invalidator (*this), [&, tb]() { box_rec_enable_change (*tb); }, gui_context());
|
||||
tb->RecEnableChanged.connect (object_connections, invalidator (*this), std::bind (&Pianoroll::rec_enable_change, this), gui_context());
|
||||
|
||||
Stripable* st = dynamic_cast<Stripable*> (ref.box()->owner());
|
||||
assert (st);
|
||||
|
|
@ -2377,7 +2378,7 @@ Pianoroll::set (TriggerReference & tref)
|
|||
|
||||
_track->DropReferences.connect (object_connections, invalidator (*this), std::bind (&Pianoroll::unset, this), gui_context());
|
||||
ref.trigger()->PropertyChanged.connect (object_connections, invalidator (*this), std::bind (&Pianoroll::trigger_prop_change, this, _1), gui_context());
|
||||
ref.trigger()->ArmChanged.connect (object_connections, invalidator (*this), std::bind (&Pianoroll::rec_enable_change, this), gui_context());
|
||||
ref.trigger()->ArmChanged.connect (object_connections, invalidator (*this), std::bind (&Pianoroll::trigger_arm_change, this), gui_context());
|
||||
|
||||
if (ref.trigger()->the_region()) {
|
||||
|
||||
|
|
|
|||
|
|
@ -95,8 +95,7 @@ class Pianoroll : public CueEditor
|
|||
Editing::MouseMode current_mouse_mode () const;
|
||||
bool internal_editing() const;
|
||||
|
||||
void box_rec_enable_change (ARDOUR::TriggerBox const &);
|
||||
void trigger_rec_enable_change (ARDOUR::Trigger const &);
|
||||
void trigger_arm_change ();
|
||||
|
||||
double timebar_height;
|
||||
size_t n_timebars;
|
||||
|
|
|
|||
|
|
@ -359,7 +359,7 @@ TriggerPage::set_session (Session* s)
|
|||
_session->config.ParameterChanged.connect (_session_connections, invalidator (*this), std::bind (&TriggerPage::parameter_changed, this, _1), gui_context ());
|
||||
|
||||
Editor::instance ().get_selection ().TriggersChanged.connect (sigc::mem_fun (*this, &TriggerPage::selection_changed));
|
||||
Trigger::TriggerArmChanged.connect (*this, invalidator (*this), std::bind (&TriggerPage::rec_enable_changed, this, _1), gui_context());
|
||||
Trigger::TriggerArmChanged.connect (*this, invalidator (*this), std::bind (&TriggerPage::trigger_arm_changed, this, _1), gui_context());
|
||||
|
||||
initial_track_display ();
|
||||
|
||||
|
|
@ -461,15 +461,16 @@ TriggerPage::clear_selected_slot ()
|
|||
}
|
||||
|
||||
void
|
||||
TriggerPage::rec_enable_changed (Trigger const * trigger)
|
||||
TriggerPage::trigger_arm_changed (Trigger const * trigger)
|
||||
{
|
||||
assert (trigger);
|
||||
|
||||
if (!trigger->armed()) {
|
||||
_midi_editor->trigger_rec_enable_change (*trigger);
|
||||
return;
|
||||
}
|
||||
|
||||
std::cerr << "TP:tac\n";
|
||||
|
||||
/* hide everything */
|
||||
|
||||
_slot_prop_box.hide ();
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ private:
|
|||
AxisView* axis_view_by_control (std::shared_ptr<ARDOUR::AutomationControl>) const;
|
||||
|
||||
void selection_changed ();
|
||||
void rec_enable_changed (ARDOUR::Trigger const *);
|
||||
void trigger_arm_changed (ARDOUR::Trigger const *);
|
||||
PBD::ScopedConnectionList editor_connections;
|
||||
|
||||
gint start_updating ();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue