mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-15 02:37:49 -06:00
Save/Load all machines from config files at startup
This commit is contained in:
parent
a13be5d9dc
commit
dadeb87801
1 changed files with 1 additions and 6 deletions
|
@ -46,11 +46,6 @@ class PrinterApplication(QtApplication):
|
||||||
|
|
||||||
self._physics = PlatformPhysics(controller)
|
self._physics = PlatformPhysics(controller)
|
||||||
|
|
||||||
try:
|
|
||||||
self.getMachineSettings().loadValuesFromFile(Resources.getPath(Resources.SettingsLocation, 'ultimaker2.cfg'))
|
|
||||||
except FileNotFoundError:
|
|
||||||
pass
|
|
||||||
|
|
||||||
root = controller.getScene().getRoot()
|
root = controller.getScene().getRoot()
|
||||||
platform = Platform(root)
|
platform = Platform(root)
|
||||||
|
|
||||||
|
@ -100,7 +95,7 @@ class PrinterApplication(QtApplication):
|
||||||
if self._engine.rootObjects:
|
if self._engine.rootObjects:
|
||||||
self.exec_()
|
self.exec_()
|
||||||
|
|
||||||
self.getMachineSettings().saveValuesToFile(Resources.getStoragePath(Resources.SettingsLocation, 'ultimaker2.cfg'))
|
self.saveMachines()
|
||||||
|
|
||||||
def registerObjects(self, engine):
|
def registerObjects(self, engine):
|
||||||
engine.rootContext().setContextProperty('Printer', self)
|
engine.rootContext().setContextProperty('Printer', self)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue