diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2008-02-21 21:45:40 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2008-02-21 21:45:40 +0000 |
commit | 0c1ee94d5d9948353919657c4c7479218b7c4361 (patch) | |
tree | 3543b0c85d130c1665dff08eb05a39c75ea7c0cb | |
parent | 9961984c9b09c0b99a170ba5bb1eff93e090c011 (diff) |
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
-rw-r--r-- | gtk2_ardour/audio_time_axis.cc | 7 | ||||
-rw-r--r-- | gtk2_ardour/editor.cc | 3 | ||||
-rw-r--r-- | gtk2_ardour/editor.h | 3 | ||||
-rw-r--r-- | gtk2_ardour/editor_mixer.cc | 2 | ||||
-rw-r--r-- | gtk2_ardour/public_editor.h | 1 | ||||
-rw-r--r-- | svn_revision.h | 2 |
6 files changed, 16 insertions, 2 deletions
diff --git a/gtk2_ardour/audio_time_axis.cc b/gtk2_ardour/audio_time_axis.cc index f451fdc514..e537165508 100644 --- a/gtk2_ardour/audio_time_axis.cc +++ b/gtk2_ardour/audio_time_axis.cc @@ -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)); - /* first idle will do the rest */ + + if (!editor.have_idled()) { + /* first idle will do the rest */ + } else { + first_idle (); + } } else { post_construct (); diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index 3878325c27..de6c6e4ae8 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -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; } diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h index 1b39b173d9..597719ce4b 100644 --- a/gtk2_ardour/editor.h +++ b/gtk2_ardour/editor.h @@ -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__ */ diff --git a/gtk2_ardour/editor_mixer.cc b/gtk2_ardour/editor_mixer.cc index fc4269f85e..715b9c467f 100644 --- a/gtk2_ardour/editor_mixer.cc +++ b/gtk2_ardour/editor_mixer.cc @@ -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 (); } diff --git a/gtk2_ardour/public_editor.h b/gtk2_ardour/public_editor.h index 82b26db296..0c8734a753 100644 --- a/gtk2_ardour/public_editor.h +++ b/gtk2_ardour/public_editor.h @@ -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; diff --git a/svn_revision.h b/svn_revision.h index 6a5c0c3d02..b9d248c4b0 100644 --- a/svn_revision.h +++ b/svn_revision.h @@ -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 |