mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-23 06:33:55 -06:00
Fixed typing
CURA-5829
This commit is contained in:
parent
fc6ad4f623
commit
cfa962311b
1 changed files with 8 additions and 6 deletions
|
@ -2,16 +2,17 @@
|
|||
# Cura is released under the terms of the LGPLv3 or higher.
|
||||
import os.path
|
||||
|
||||
from UM.Application import Application
|
||||
from UM.Qt.QtApplication import QtApplication
|
||||
from cura.Stages.CuraStage import CuraStage
|
||||
|
||||
from typing import TYPE_CHECKING, Optional
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from UM.View import View
|
||||
from UM.View.View import View
|
||||
|
||||
|
||||
class PreviewStage(CuraStage):
|
||||
def __init__(self, application: Application, parent = None) -> None:
|
||||
def __init__(self, application: QtApplication, parent = None) -> None:
|
||||
super().__init__(parent)
|
||||
self._application = application
|
||||
self._application.engineCreatedSignal.connect(self._engineCreated)
|
||||
|
@ -26,6 +27,7 @@ class PreviewStage(CuraStage):
|
|||
self._previously_active_view = None
|
||||
|
||||
def _engineCreated(self) -> None:
|
||||
menu_component_path = os.path.join(self._application.getPluginRegistry().getPluginPath(self.getPluginId()),
|
||||
"PreviewMenu.qml")
|
||||
plugin_path = self._application.getPluginRegistry().getPluginPath(self.getPluginId())
|
||||
if plugin_path is not None:
|
||||
menu_component_path = os.path.join(plugin_path, "PreviewMenu.qml")
|
||||
self.addDisplayComponent("menu", menu_component_path)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue