mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-08 23:46:22 -06:00
Don't try to get the plugin path when there's no plugin registry
i.e. in tests Contributes to CL-1274
This commit is contained in:
parent
a74717ca3c
commit
88fc7d0fba
3 changed files with 21 additions and 17 deletions
|
@ -84,6 +84,7 @@ class CloudOutputDevice(NetworkedPrinterOutputDevice):
|
||||||
self._account = api_client.account
|
self._account = api_client.account
|
||||||
|
|
||||||
# We use the Cura Connect monitor tab to get most functionality right away.
|
# We use the Cura Connect monitor tab to get most functionality right away.
|
||||||
|
if PluginRegistry.getInstance() is not None:
|
||||||
self._monitor_view_qml_path = os.path.join(
|
self._monitor_view_qml_path = os.path.join(
|
||||||
PluginRegistry.getInstance().getPluginPath("UM3NetworkPrinting"),
|
PluginRegistry.getInstance().getPluginPath("UM3NetworkPrinting"),
|
||||||
"resources", "qml", "MonitorStage.qml"
|
"resources", "qml", "MonitorStage.qml"
|
||||||
|
|
|
@ -65,6 +65,7 @@ class ClusterUM3OutputDevice(NetworkedPrinterOutputDevice):
|
||||||
self._print_jobs = [] # type: List[UM3PrintJobOutputModel]
|
self._print_jobs = [] # type: List[UM3PrintJobOutputModel]
|
||||||
self._received_print_jobs = False # type: bool
|
self._received_print_jobs = False # type: bool
|
||||||
|
|
||||||
|
if PluginRegistry.getInstance() is not None:
|
||||||
self._monitor_view_qml_path = os.path.join(
|
self._monitor_view_qml_path = os.path.join(
|
||||||
PluginRegistry.getInstance().getPluginPath("UM3NetworkPrinting"),
|
PluginRegistry.getInstance().getPluginPath("UM3NetworkPrinting"),
|
||||||
"resources", "qml", "MonitorStage.qml"
|
"resources", "qml", "MonitorStage.qml"
|
||||||
|
@ -129,6 +130,7 @@ class ClusterUM3OutputDevice(NetworkedPrinterOutputDevice):
|
||||||
|
|
||||||
def _spawnPrinterSelectionDialog(self):
|
def _spawnPrinterSelectionDialog(self):
|
||||||
if self._printer_selection_dialog is None:
|
if self._printer_selection_dialog is None:
|
||||||
|
if PluginRegistry.getInstance() is not None:
|
||||||
path = os.path.join(
|
path = os.path.join(
|
||||||
PluginRegistry.getInstance().getPluginPath("UM3NetworkPrinting"),
|
PluginRegistry.getInstance().getPluginPath("UM3NetworkPrinting"),
|
||||||
"resources", "qml", "PrintWindow.qml"
|
"resources", "qml", "PrintWindow.qml"
|
||||||
|
|
|
@ -77,6 +77,7 @@ class LegacyUM3OutputDevice(NetworkedPrinterOutputDevice):
|
||||||
|
|
||||||
self.setIconName("print")
|
self.setIconName("print")
|
||||||
|
|
||||||
|
if PluginRegistry.getInstance() is not None:
|
||||||
self._monitor_view_qml_path = os.path.join(
|
self._monitor_view_qml_path = os.path.join(
|
||||||
PluginRegistry.getInstance().getPluginPath("UM3NetworkPrinting"),
|
PluginRegistry.getInstance().getPluginPath("UM3NetworkPrinting"),
|
||||||
"resources", "qml", "MonitorStage.qml"
|
"resources", "qml", "MonitorStage.qml"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue