Browse Source

Fix mypy complaining that Application has no createQmlComponent

Using CuraApplication instead fixes the problem

CURA-7609
Kostas Karmas 4 years ago
parent
commit
e5d3271698
1 changed files with 4 additions and 1 deletions
  1. 4 1
      plugins/3MFReader/WorkspaceDialog.py

+ 4 - 1
plugins/3MFReader/WorkspaceDialog.py

@@ -12,6 +12,9 @@ from UM.Settings.ContainerRegistry import ContainerRegistry
 import os
 import threading
 import time
+
+from cura.CuraApplication import CuraApplication
+
 i18n_catalog = i18nCatalog("cura")
 
 
@@ -295,7 +298,7 @@ class WorkspaceDialog(QObject):
         three_mf_reader_path = PluginRegistry.getInstance().getPluginPath("3MFReader")
         if three_mf_reader_path:
             path = os.path.join(three_mf_reader_path, self._qml_url)
-            self._view = Application.getInstance().createQmlComponent(path, {"manager": self})
+            self._view = CuraApplication.getInstance().createQmlComponent(path, {"manager": self})
 
     def show(self) -> None:
         # Emit signal so the right thread actually shows the view.