fix first_idle idea so that tracks added after session loading show up OK

git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3104 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2008-02-21 21:45:40 +00:00
parent 9961984c9b
commit 0c1ee94d5d
6 changed files with 16 additions and 2 deletions

View file

@ -113,7 +113,12 @@ AudioTimeAxisView::AudioTimeAxisView (PublicEditor& ed, Session& sess, boost::sh
/* ask for notifications of any new RegionViews */
_view->RegionViewAdded.connect (mem_fun(*this, &AudioTimeAxisView::region_view_added));
if (!editor.have_idled()) {
/* first idle will do the rest */
} else {
first_idle ();
}
} else {
post_construct ();

View file

@ -235,6 +235,7 @@ Editor::Editor ()
PublicEditor::_instance = this;
session = 0;
_have_idled = false;
selection = new Selection;
cut_buffer = new Selection;
@ -4516,4 +4517,6 @@ Editor::first_idle ()
if (dialog) {
delete dialog;
}
_have_idled = true;
}

View file

@ -131,6 +131,7 @@ class Editor : public PublicEditor
void connect_to_session (ARDOUR::Session *);
ARDOUR::Session* current_session() const { return session; }
void first_idle ();
virtual bool have_idled() const { return _have_idled; }
nframes_t leftmost_position() const { return leftmost_frame; }
nframes_t current_page_frames() const {
@ -2110,6 +2111,8 @@ public:
void remove_tracks ();
void toggle_tracks_active ();
void waveform_scale_chosen (Editing::WaveformScale);
bool _have_idled;
};
#endif /* __ardour_editor_h__ */

View file

@ -287,6 +287,8 @@ Editor::current_mixer_strip_hidden ()
void
Editor::session_going_away ()
{
_have_idled = false;
for (vector<sigc::connection>::iterator i = session_connections.begin(); i != session_connections.end(); ++i) {
(*i).disconnect ();
}

View file

@ -84,6 +84,7 @@ class PublicEditor : public Gtk::Window, public PBD::StatefulThingWithGoingAway
virtual void connect_to_session (ARDOUR::Session*) = 0;
virtual ARDOUR::Session* current_session() const = 0;
virtual bool have_idled() const = 0;
virtual void first_idle() = 0;
virtual void set_snap_to (Editing::SnapType) = 0;
virtual void set_snap_mode (Editing::SnapMode) = 0;

View file

@ -1,4 +1,4 @@
#ifndef __ardour_svn_revision_h__
#define __ardour_svn_revision_h__
static const char* ardour_svn_revision = "3095";
static const char* ardour_svn_revision = "3096";
#endif