mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-13 05:09:00 +08:00
Try to read and write the current machine setting values for the application
This commit is contained in:
parent
7b686143d2
commit
3b2a6423d0
@ -24,6 +24,11 @@ class PrinterApplication(QtApplication):
|
||||
root = self.getController().getScene().getRoot()
|
||||
platform = Platform(root)
|
||||
|
||||
try:
|
||||
self.getMachineSettings().loadValuesFromFile(Resources.getPath(Resources.SettingsLocation, 'ultimaker2.cfg'))
|
||||
except FileNotFoundError:
|
||||
pass
|
||||
|
||||
self.getRenderer().setLightPosition(Vector(0, 150, 150))
|
||||
|
||||
camera = Camera('3d', root)
|
||||
@ -66,5 +71,7 @@ class PrinterApplication(QtApplication):
|
||||
if self._engine.rootObjects:
|
||||
self.exec_()
|
||||
|
||||
self.getMachineSettings().saveValuesToFile(Resources.getStoragePath(Resources.SettingsLocation, 'ultimaker2.cfg'))
|
||||
|
||||
def registerObjects(self, engine):
|
||||
pass
|
||||
|
Loading…
x
Reference in New Issue
Block a user