Only write scripts to stack upon pressing close button

This is more efficient, because we're not writing every time you modify the list of scripts. It's also more complete, since if you don't modify the list of scripts but just modify one of the settings, that setting change also gets written to the stack after closing the window.
This commit is contained in:
Ruben D 2018-02-04 01:26:34 +01:00
parent bebcd78db0
commit 927f193270
No known key found for this signature in database
GPG key ID: 6B42C9465E304A62
2 changed files with 11 additions and 2 deletions

View file

@ -21,6 +21,14 @@ UM.Dialog
minimumWidth: 400 * screenScaleFactor;
minimumHeight: 250 * screenScaleFactor;
onVisibleChanged:
{
if(!visible) //Whenever the window is closed (either via the "Close" button or the X on the window frame), we want to update it in the stack.
{
manager.writeScriptsToStack();
}
}
Item
{
UM.I18nCatalog{id: catalog; name:"cura"}