New Session command deletes the current session if it is not in runtime else prompt save running session, and then creates the new session
This commit is contained in:
parent
b72ce6a66c
commit
7dee59e86e
2 changed files with 5 additions and 1 deletions
|
@ -192,3 +192,7 @@ class MenuAction:
|
|||
logging.error("unexpected number of recent files")
|
||||
self.app.save_config()
|
||||
self.app.menubar.update_recent_files()
|
||||
|
||||
def new_session(self):
|
||||
self.prompt_save_running_session()
|
||||
self.app.core.create_new_session()
|
||||
|
|
|
@ -49,7 +49,7 @@ class Menubar(tk.Menu):
|
|||
menu.add_command(
|
||||
label="New Session",
|
||||
accelerator="Ctrl+N",
|
||||
command=self.app.core.create_new_session,
|
||||
command=self.menuaction.new_session,
|
||||
)
|
||||
self.app.bind_all("<Control-n>", lambda e: self.app.core.create_new_session())
|
||||
menu.add_command(
|
||||
|
|
Loading…
Reference in a new issue