only reset max file and clear undo buffer when there is unsaved change before starting new scene

This commit is contained in:
Kayla Man 2024-05-08 22:56:26 +08:00
parent d25e8f508e
commit 36cbdcfde7

View file

@ -161,8 +161,9 @@ def ls() -> list:
def on_new():
lib.set_context_setting()
rt.resetMaxFile(rt.Name("noPrompt"))
rt.clearUndoBuffer()
if rt.checkForSave():
rt.resetMaxFile(rt.Name("noPrompt"))
rt.clearUndoBuffer()
def containerise(name: str, nodes: list, context,