Try to read and write the current machine setting values for the application

This commit is contained in:
Arjen Hiemstra 2014-12-11 16:44:43 +01:00
parent 7b686143d2
commit 3b2a6423d0

View file

@ -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