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)
This commit is contained in:
parent
0a13106765
commit
b21c4b41a3
@ -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)) {
|
||||
|
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user