mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-08 15:37:27 -06:00
Move backend location preference into the backend class and use the new api
This commit is contained in:
parent
27f475dc79
commit
4e6322d94e
2 changed files with 3 additions and 4 deletions
|
@ -17,6 +17,8 @@ class CuraEngineBackend(Backend):
|
|||
def __init__(self):
|
||||
super().__init__()
|
||||
|
||||
Preferences.getInstance().addPreference('backend/location', '../PinkUnicornEngine/CuraEngine')
|
||||
|
||||
self._scene = Application.getInstance().getController().getScene()
|
||||
self._scene.sceneChanged.connect(self._onSceneChanged)
|
||||
|
||||
|
@ -34,7 +36,7 @@ class CuraEngineBackend(Backend):
|
|||
self._center = None
|
||||
|
||||
def getEngineCommand(self):
|
||||
return [Preferences.getPreference("BackendLocation"), '--connect', "127.0.0.1:{0}".format(self._port)]
|
||||
return [Preferences.getInstance().getValue("backend/location"), '--connect', "127.0.0.1:{0}".format(self._port)]
|
||||
|
||||
def _onSceneChanged(self, source):
|
||||
if (type(source) is not SceneNode) or (source is self._scene.getRoot()):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue