mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 02:35:53 +08:00
Use getPluginPath()
CURA-6005
This commit is contained in:
parent
aee4034e3e
commit
520b34ab89
@ -68,7 +68,8 @@ class DrivePluginExtension(QObject, Extension):
|
|||||||
|
|
||||||
def showDriveWindow(self) -> None:
|
def showDriveWindow(self) -> None:
|
||||||
if not self._drive_window:
|
if not self._drive_window:
|
||||||
path = os.path.join(os.path.dirname(__file__), "qml", "main.qml")
|
plugin_dir_path = CuraApplication.getInstance().getPluginRegistry().getPluginPath("CuraDrive")
|
||||||
|
path = os.path.join(plugin_dir_path, "src", "qml", "main.qml")
|
||||||
self._drive_window = CuraApplication.getInstance().createQmlComponent(path, {"CuraDrive": self})
|
self._drive_window = CuraApplication.getInstance().createQmlComponent(path, {"CuraDrive": self})
|
||||||
self.refreshBackups()
|
self.refreshBackups()
|
||||||
if self._drive_window:
|
if self._drive_window:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user