summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2012-10-10 15:19:58 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2012-10-10 15:19:58 +0000
commit82fb1acf2a00a55ac04422766e723048a4954a2f (patch)
treea08aa99ee1ac30c6bea5ef10da54df7e1bc7c10c /gtk2_ardour/editor.cc
parent8a6b0ab072f4cd1da0f30081b11ad228919af864 (diff)
break out of step editing if a session goes away; do nothing in Editor::located() if the session has gone away
git-svn-id: svn://localhost/ardour2/branches/3.0@13229 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor.cc')
-rw-r--r--gtk2_ardour/editor.cc14
1 files changed, 10 insertions, 4 deletions
diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc
index 5d92ccb08e..d07ac8794a 100644
--- a/gtk2_ardour/editor.cc
+++ b/gtk2_ardour/editor.cc
@@ -1178,6 +1178,8 @@ Editor::update_title ()
WindowTitle title(session_name);
title += Glib::get_application_name();
set_title (title.get_string());
+ } else {
+ /* ::session_going_away() will have taken care of it */
}
}
@@ -3194,7 +3196,7 @@ Editor::new_tempo_section ()
void
Editor::map_transport_state ()
{
- ENSURE_GUI_THREAD (*this, &Editor::map_transport_state)
+ ENSURE_GUI_THREAD (*this, &Editor::map_transport_state);
if (_session && _session->transport_stopped()) {
have_pending_keyboard_selection = false;
@@ -4736,9 +4738,11 @@ Editor::located ()
{
ENSURE_GUI_THREAD (*this, &Editor::located);
- playhead_cursor->set_position (_session->audible_frame ());
- if (_follow_playhead && !_pending_initial_locate) {
- reset_x_origin_to_follow_playhead ();
+ if (_session) {
+ playhead_cursor->set_position (_session->audible_frame ());
+ if (_follow_playhead && !_pending_initial_locate) {
+ reset_x_origin_to_follow_playhead ();
+ }
}
_pending_locate_request = false;
@@ -5300,6 +5304,8 @@ Editor::session_going_away ()
hide_measures ();
clear_marker_display ();
+ stop_step_editing ();
+
current_bbt_points_begin = current_bbt_points_end;
/* get rid of any existing editor mixer strip */