mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-11 02:09:00 +08: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
c010f3203c
commit
3cbf0640a5
@ -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…
x
Reference in New Issue
Block a user