mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-23 14:44:13 -06:00
Added method to close the application (after clicking quit button) to prevent loss of custom material
CURA-3298
This commit is contained in:
parent
b43acf5b18
commit
153d1f2d0c
2 changed files with 7 additions and 1 deletions
|
@ -367,6 +367,12 @@ class CuraApplication(QtApplication):
|
||||||
def _onEngineCreated(self):
|
def _onEngineCreated(self):
|
||||||
self._engine.addImageProvider("camera", CameraImageProvider.CameraImageProvider())
|
self._engine.addImageProvider("camera", CameraImageProvider.CameraImageProvider())
|
||||||
|
|
||||||
|
## The "Quit" button click event handler.
|
||||||
|
@pyqtSlot()
|
||||||
|
def closeApplication(self):
|
||||||
|
Logger.log("i", "Close application")
|
||||||
|
self._main_window.close()
|
||||||
|
|
||||||
## A reusable dialogbox
|
## A reusable dialogbox
|
||||||
#
|
#
|
||||||
showMessageBox = pyqtSignal(str, str, str, str, int, int, arguments = ["title", "text", "informativeText", "detailedText", "buttons", "icon"])
|
showMessageBox = pyqtSignal(str, str, str, str, int, int, arguments = ["title", "text", "informativeText", "detailedText", "buttons", "icon"])
|
||||||
|
|
|
@ -632,7 +632,7 @@ UM.MainWindow
|
||||||
Connections
|
Connections
|
||||||
{
|
{
|
||||||
target: Cura.Actions.quit
|
target: Cura.Actions.quit
|
||||||
onTriggered: base.visible = false;
|
onTriggered: CuraApplication.closeApplication();
|
||||||
}
|
}
|
||||||
|
|
||||||
Connections
|
Connections
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue