diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2017-05-29 15:35:03 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2017-05-29 15:35:03 -0400 |
commit | b21c4b41a39c4ace711b52c2ee02617e8c274aae (patch) | |
tree | ac89e8b439bb3f6ca028d47a688c40c498ab5d99 | |
parent | 0a13106765638eb0eadf487773fcaa40461cd9f6 (diff) |
when creating a new session after working on one, the "Cancel" button should be a quit button.
This avoids ending up with a null Session pointer in the GUI (#7369)
-rw-r--r-- | gtk2_ardour/ardour_ui.cc | 2 | ||||
-rw-r--r-- | gtk2_ardour/ardour_ui_ed.cc | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index 7b43f33082..fd3ba20a3a 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -3354,7 +3354,7 @@ ARDOUR_UI::get_session_parameters (bool quit_on_cancel, bool should_be_new, stri /* if there is already a session, relabel the button on the SessionDialog so that we don't Quit directly */ - cancel_not_quit = (_session != 0); + cancel_not_quit = (_session != 0) && !quit_on_cancel; if (_session && _session->dirty()) { if (unload_session (false)) { diff --git a/gtk2_ardour/ardour_ui_ed.cc b/gtk2_ardour/ardour_ui_ed.cc index 3eb0639933..ef0ed7805f 100644 --- a/gtk2_ardour/ardour_ui_ed.cc +++ b/gtk2_ardour/ardour_ui_ed.cc @@ -161,7 +161,7 @@ ARDOUR_UI::install_actions () /* the real actions */ - act = global_actions.register_action (main_actions, X_("New"), _("New..."), hide_return (sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::get_session_parameters), false, true, ""))); + act = global_actions.register_action (main_actions, X_("New"), _("New..."), hide_return (sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::get_session_parameters), true, true, ""))); global_actions.register_action (main_actions, X_("Open"), _("Open..."), sigc::mem_fun(*this, &ARDOUR_UI::open_session)); global_actions.register_action (main_actions, X_("Recent"), _("Recent..."), sigc::mem_fun(*this, &ARDOUR_UI::open_recent_session)); |