ensure count-in for clip recording vanishes at transport stop/rec-disable
This commit is contained in:
@@ -894,9 +894,42 @@ AudioClipEditor::snap_mode_chosen (Editing::SnapMode)
|
||||
void
|
||||
AudioClipEditor::grid_type_chosen (Editing::GridType gt)
|
||||
{
|
||||
EC_LOCAL_TEMPO_SCOPE;
|
||||
|
||||
if (gt != Editing::GridTypeMinSec && grid_actions[gt] && grid_actions[gt]->get_active()) {
|
||||
assert (grid_actions[Editing::GridTypeMinSec]);
|
||||
grid_actions[Editing::GridTypeMinSec]->set_active (false);
|
||||
grid_actions[Editing::GridTypeMinSec]->set_active (true);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
AudioClipEditor::set_session (ARDOUR::Session* s)
|
||||
{
|
||||
EC_LOCAL_TEMPO_SCOPE;
|
||||
|
||||
CueEditor::set_session (s);
|
||||
|
||||
if (_session) {
|
||||
_session->TransportStateChange.connect (_session_connections, MISSING_INVALIDATOR, std::bind (&AudioClipEditor::map_transport_state, this), gui_context());
|
||||
} else {
|
||||
_session_connections.drop_connections();
|
||||
}
|
||||
|
||||
map_transport_state ();
|
||||
}
|
||||
|
||||
void
|
||||
AudioClipEditor::map_transport_state ()
|
||||
{
|
||||
EC_LOCAL_TEMPO_SCOPE;
|
||||
|
||||
if (!_session) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_session->transport_rolling()) {
|
||||
hide_count_in ();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -110,6 +110,8 @@ public:
|
||||
samplecnt_t current_page_samples() const;
|
||||
void set_samples_per_pixel (samplecnt_t);
|
||||
|
||||
void set_session (ARDOUR::Session* s);
|
||||
|
||||
Gdk::Cursor* which_track_cursor () const { return nullptr; }
|
||||
Gdk::Cursor* which_mode_cursor () const { return nullptr; }
|
||||
Gdk::Cursor* which_trim_cursor (bool left_side) const { return nullptr; }
|
||||
@@ -209,4 +211,6 @@ public:
|
||||
void grid_type_chosen (Editing::GridType);
|
||||
|
||||
Gtk::Box* pack_mouse_mode_box () { return nullptr; }
|
||||
|
||||
void map_transport_state ();
|
||||
};
|
||||
|
||||
@@ -707,6 +707,7 @@ CueEditor::rec_enable_change ()
|
||||
break;
|
||||
case Disabled:
|
||||
rec_enable_button.set_active_state (Gtkmm2ext::Off);
|
||||
hide_count_in ();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1447,6 +1448,7 @@ CueEditor::maybe_set_count_in ()
|
||||
}
|
||||
|
||||
if (ref.box()->record_enabled() == Disabled) {
|
||||
hide_count_in ();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -558,7 +558,6 @@ Pianoroll::maybe_update ()
|
||||
}
|
||||
|
||||
if (_track->triggerbox()->record_enabled() == Recording) {
|
||||
|
||||
_playhead_cursor->set_position (data_capture_duration);
|
||||
}
|
||||
|
||||
@@ -1812,16 +1811,14 @@ Pianoroll::set_session (ARDOUR::Session* s)
|
||||
|
||||
CueEditor::set_session (s);
|
||||
|
||||
if (with_transport_controls) {
|
||||
if (_session) {
|
||||
_session->TransportStateChange.connect (_session_connections, MISSING_INVALIDATOR, std::bind (&Pianoroll::map_transport_state, this), gui_context());
|
||||
} else {
|
||||
_session_connections.drop_connections();
|
||||
}
|
||||
|
||||
map_transport_state ();
|
||||
if (_session) {
|
||||
_session->TransportStateChange.connect (_session_connections, MISSING_INVALIDATOR, std::bind (&Pianoroll::map_transport_state, this), gui_context());
|
||||
} else {
|
||||
_session_connections.drop_connections();
|
||||
}
|
||||
|
||||
map_transport_state ();
|
||||
|
||||
if (_session) {
|
||||
zoom_to_show (timecnt_t (timepos_t (max_extents_scale() * max_zoom_extent ().second.samples())));
|
||||
}
|
||||
@@ -1870,6 +1867,8 @@ Pianoroll::map_transport_state ()
|
||||
} else {
|
||||
loop_button.set_active (false);
|
||||
}
|
||||
|
||||
hide_count_in ();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user