actally stop doing clip recording visual stuff when disarmed (gui)
This commit is contained in:
parent
837ea32898
commit
70b41d10b1
@ -318,11 +318,12 @@ MidiCueEditor::maybe_update ()
|
||||
}
|
||||
|
||||
if (_track->rec_enable_control()->get_value()) {
|
||||
/* data recorded will handle it */
|
||||
/* ::data_captured() will handle it */
|
||||
return;
|
||||
}
|
||||
|
||||
ARDOUR::TriggerPtr trigger = _track->triggerbox()->currently_playing ();
|
||||
|
||||
if (!trigger) {
|
||||
_playhead_cursor->set_position (0);
|
||||
} else {
|
||||
@ -503,14 +504,24 @@ MidiCueEditor::set_box (std::shared_ptr<ARDOUR::TriggerBox> b)
|
||||
b->Captured.connect (capture_connections, invalidator (*this), boost::bind (&MidiCueEditor::data_captured, this, _1), gui_context());
|
||||
/* Don't bind a shared_ptr<TriggerBox> within the lambda */
|
||||
TriggerBox* tb (b.get());
|
||||
b->RecEnableChanged.connect (capture_connections, invalidator (*this), [&, tb]() { rec_enable_change (tb); }, gui_context());
|
||||
b->RecEnableChanged.connect (capture_connections, invalidator (*this), [&, tb]() { box_rec_enable_change (*tb); }, gui_context());
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
MidiCueEditor::rec_enable_change (ARDOUR::TriggerBox* b)
|
||||
MidiCueEditor::box_rec_enable_change (ARDOUR::TriggerBox const & b)
|
||||
{
|
||||
if (b->record_enabled()) {
|
||||
if (b.record_enabled()) {
|
||||
view->begin_write();
|
||||
} else {
|
||||
view->end_write ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
MidiCueEditor::trigger_rec_enable_change (ARDOUR::Trigger const & t)
|
||||
{
|
||||
if (t.armed()) {
|
||||
view->begin_write();
|
||||
} else {
|
||||
view->end_write ();
|
||||
|
@ -86,6 +86,9 @@ class MidiCueEditor : 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 &);
|
||||
|
||||
double timebar_height;
|
||||
size_t n_timebars;
|
||||
|
||||
@ -211,7 +214,6 @@ class MidiCueEditor : public CueEditor
|
||||
void visual_changer (const VisualChange&);
|
||||
void bindings_changed ();
|
||||
|
||||
void rec_enable_change (ARDOUR::TriggerBox*);
|
||||
void data_captured (Temporal::timecnt_t);
|
||||
bool idle_data_captured ();
|
||||
std::atomic<int> idle_update_queued;
|
||||
|
@ -1560,7 +1560,6 @@ MidiView::apply_note_range (uint8_t min, uint8_t max, bool force)
|
||||
void
|
||||
MidiView::begin_write()
|
||||
{
|
||||
std::cerr << "MV::begin write\n";
|
||||
if (_active_notes) {
|
||||
delete [] _active_notes;
|
||||
}
|
||||
@ -1577,7 +1576,6 @@ MidiView::begin_write()
|
||||
void
|
||||
MidiView::end_write()
|
||||
{
|
||||
std::cerr << "MV::end write\n";
|
||||
delete [] _active_notes;
|
||||
_active_notes = nullptr;
|
||||
_marked_for_selection.clear();
|
||||
|
@ -386,6 +386,13 @@ TriggerPage::clear_selected_slot ()
|
||||
void
|
||||
TriggerPage::rec_enable_changed (Trigger const * trigger)
|
||||
{
|
||||
assert (trigger);
|
||||
|
||||
if (!trigger->armed()) {
|
||||
_midi_editor->trigger_rec_enable_change (*trigger);
|
||||
return;
|
||||
}
|
||||
|
||||
/* hide everything */
|
||||
|
||||
_slot_prop_box.hide ();
|
||||
@ -406,7 +413,9 @@ TriggerPage::rec_enable_changed (Trigger const * trigger)
|
||||
_audio_trig_box.set_trigger (ref);
|
||||
_audio_trig_box.show ();
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
_midi_trig_box.set_trigger (ref);
|
||||
_midi_trig_box.show ();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user