mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-09 07:56:22 -06:00
Don't use __file__
Contributes to CL-1274
This commit is contained in:
parent
cf9a1c0248
commit
cac8c85489
4 changed files with 24 additions and 9 deletions
|
@ -65,7 +65,10 @@ class ClusterUM3OutputDevice(NetworkedPrinterOutputDevice):
|
|||
self._print_jobs = [] # type: List[UM3PrintJobOutputModel]
|
||||
self._received_print_jobs = False # type: bool
|
||||
|
||||
self._monitor_view_qml_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "../resources/qml/MonitorStage.qml")
|
||||
self._monitor_view_qml_path = os.path.join(
|
||||
PluginRegistry.getPluginDirectory(),
|
||||
"UM3NetworkPrinting", "resources", "qml", "MonitorStage.qml"
|
||||
)
|
||||
|
||||
# Trigger the printersChanged signal when the private signal is triggered
|
||||
self.printersChanged.connect(self._clusterPrintersChanged)
|
||||
|
@ -126,7 +129,10 @@ class ClusterUM3OutputDevice(NetworkedPrinterOutputDevice):
|
|||
|
||||
def _spawnPrinterSelectionDialog(self):
|
||||
if self._printer_selection_dialog is None:
|
||||
path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "../resources/qml/PrintWindow.qml")
|
||||
path = os.path.join(
|
||||
PluginRegistry.getPluginDirectory(),
|
||||
"UM3NetworkPrinting", "resources", "qml", "PrintWindow.qml"
|
||||
)
|
||||
self._printer_selection_dialog = self._application.createQmlComponent(path, {"OutputDevice": self})
|
||||
if self._printer_selection_dialog is not None:
|
||||
self._printer_selection_dialog.show()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue