From 3b2a6423d08a3e147d7120e157c378ebd0878384 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Thu, 11 Dec 2014 16:44:43 +0100 Subject: [PATCH] Try to read and write the current machine setting values for the application --- PrinterApplication.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/PrinterApplication.py b/PrinterApplication.py index c29e84910a..da2f5bc4b3 100644 --- a/PrinterApplication.py +++ b/PrinterApplication.py @@ -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