mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-16 03:07:53 -06:00
Update network cluster output device print view component creation - CURA-4568
This commit is contained in:
parent
11f50f1cd3
commit
b40ba0cfc7
1 changed files with 2 additions and 11 deletions
|
@ -235,17 +235,8 @@ class NetworkClusterPrinterOutputDevice(NetworkPrinterOutputDevice.NetworkPrinte
|
||||||
|
|
||||||
def spawnPrintView(self):
|
def spawnPrintView(self):
|
||||||
if self._print_view is None:
|
if self._print_view is None:
|
||||||
path = QUrl.fromLocalFile(os.path.join(self._plugin_path, "PrintWindow.qml"))
|
path = os.path.join(self._plugin_path, "PrintWindow.qml")
|
||||||
component = QQmlComponent(Application.getInstance()._engine, path)
|
self._print_view = Application.getInstance().createQmlComponent(path, {"OutputDevice", self})
|
||||||
|
|
||||||
self._print_context = QQmlContext(Application.getInstance()._engine.rootContext())
|
|
||||||
self._print_context.setContextProperty("OutputDevice", self)
|
|
||||||
self._print_view = component.create(self._print_context)
|
|
||||||
|
|
||||||
if component.isError():
|
|
||||||
Logger.log("e", " Errors creating component: \n%s", "\n".join(
|
|
||||||
[e.toString() for e in component.errors()]))
|
|
||||||
|
|
||||||
if self._print_view is not None:
|
if self._print_view is not None:
|
||||||
self._print_view.show()
|
self._print_view.show()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue