RecorderUI: keep track of playlist changes
This fixes a bug that the recorder display does not correctly redraw when using a new or different playlist.
This commit is contained in:
parent
d60a6a890d
commit
6027e49e58
@ -672,7 +672,7 @@ TrackRecordAxis::TrackSummary::TrackSummary (boost::shared_ptr<ARDOUR::Route> r)
|
||||
assert (_track);
|
||||
|
||||
_track->PlaylistChanged.connect (_connections, invalidator (*this), boost::bind (&TrackSummary::playlist_changed, this), gui_context ());
|
||||
_track->playlist()->ContentsChanged.connect (_connections, invalidator (*this), boost::bind (&TrackSummary::playlist_changed, this), gui_context ());
|
||||
_track->playlist()->ContentsChanged.connect (_playlist_connections, invalidator (*this), boost::bind (&TrackSummary::playlist_contents_changed, this), gui_context ());
|
||||
_track->presentation_info().PropertyChanged.connect (_connections, invalidator (*this), boost::bind (&TrackSummary::property_changed, this, _1), gui_context ());
|
||||
|
||||
_track->rec_enable_control()->Changed.connect (_connections, invalidator (*this), boost::bind (&TrackSummary::maybe_setup_rec_box, this), gui_context());
|
||||
@ -831,6 +831,14 @@ TrackRecordAxis::TrackSummary::playhead_position_changed (samplepos_t p)
|
||||
|
||||
void
|
||||
TrackRecordAxis::TrackSummary::playlist_changed ()
|
||||
{
|
||||
_playlist_connections.disconnect ();
|
||||
_track->playlist()->ContentsChanged.connect (_playlist_connections, invalidator (*this), boost::bind (&TrackSummary::playlist_contents_changed, this), gui_context ());
|
||||
set_dirty ();
|
||||
}
|
||||
|
||||
void
|
||||
TrackRecordAxis::TrackSummary::playlist_contents_changed ()
|
||||
{
|
||||
set_dirty ();
|
||||
}
|
||||
|
@ -183,6 +183,7 @@ private:
|
||||
private:
|
||||
void render_region (boost::shared_ptr<ARDOUR::Region>, Cairo::RefPtr<Cairo::Context> const&, double);
|
||||
void playlist_changed ();
|
||||
void playlist_contents_changed ();
|
||||
void property_changed (PBD::PropertyChange const&);
|
||||
void maybe_setup_rec_box ();
|
||||
void update_rec_box ();
|
||||
@ -201,6 +202,7 @@ private:
|
||||
bool _rec_active;
|
||||
|
||||
std::vector<RecInfo> _rec_rects;
|
||||
PBD::ScopedConnection _playlist_connections;
|
||||
PBD::ScopedConnectionList _connections;
|
||||
sigc::connection _screen_update_connection;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user