|
@@ -13,6 +13,7 @@ from PyQt5.QtGui import QColor, QIcon
|
|
|
from PyQt5.QtWidgets import QMessageBox
|
|
|
from PyQt5.QtQml import qmlRegisterUncreatableType, qmlRegisterSingletonType, qmlRegisterType
|
|
|
|
|
|
+from UM.PluginError import PluginNotFoundError
|
|
|
from UM.Scene.SceneNode import SceneNode
|
|
|
from UM.Scene.Camera import Camera
|
|
|
from UM.Math.Vector import Vector
|
|
@@ -82,6 +83,7 @@ from cura.Settings.SettingInheritanceManager import SettingInheritanceManager
|
|
|
from cura.Settings.SimpleModeSettingsManager import SimpleModeSettingsManager
|
|
|
|
|
|
from cura.Machines.VariantManager import VariantManager
|
|
|
+from plugins.SliceInfoPlugin.SliceInfo import SliceInfo
|
|
|
|
|
|
from .SingleInstance import SingleInstance
|
|
|
from .AutoSave import AutoSave
|
|
@@ -113,7 +115,6 @@ from UM.FlameProfiler import pyqtSlot
|
|
|
|
|
|
|
|
|
if TYPE_CHECKING:
|
|
|
- from plugins.SliceInfoPlugin.SliceInfo import SliceInfo
|
|
|
from cura.Machines.MaterialManager import MaterialManager
|
|
|
from cura.Machines.QualityManager import QualityManager
|
|
|
from UM.Settings.EmptyInstanceContainer import EmptyInstanceContainer
|
|
@@ -1710,7 +1711,11 @@ class CuraApplication(QtApplication):
|
|
|
|
|
|
@pyqtSlot()
|
|
|
def showMoreInformationDialogForAnonymousDataCollection(self):
|
|
|
- cast(SliceInfo, self._plugin_registry.getPluginObject("SliceInfoPlugin")).showMoreInfoDialog()
|
|
|
+ try:
|
|
|
+ slice_info = cast(SliceInfo, self._plugin_registry.getPluginObject("SliceInfoPlugin"))
|
|
|
+ slice_info.showMoreInfoDialog()
|
|
|
+ except PluginNotFoundError:
|
|
|
+ Logger.log("w", "Plugin SliceInfo was not found, so not able to show the info dialog.")
|
|
|
|
|
|
def addSidebarCustomMenuItem(self, menu_item: dict) -> None:
|
|
|
self._sidebar_custom_menu_items.append(menu_item)
|