mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-08 07:27:29 -06:00
Fix style in some components
This commit is contained in:
parent
ab339e7784
commit
c738f306fb
5 changed files with 30 additions and 5 deletions
|
@ -224,6 +224,11 @@ class Toolbox(QObject, Extension):
|
|||
|
||||
if not self._dialog:
|
||||
self._dialog = self._createDialog("Toolbox.qml")
|
||||
|
||||
if not self._dialog:
|
||||
Logger.log("e", "Unexpected error trying to create the 'Toolbox' dialog.")
|
||||
return
|
||||
|
||||
self._dialog.show()
|
||||
|
||||
# Apply enabled/disabled state to installed plugins
|
||||
|
@ -231,7 +236,10 @@ class Toolbox(QObject, Extension):
|
|||
|
||||
def _createDialog(self, qml_name: str) -> Optional[QObject]:
|
||||
Logger.log("d", "Toolbox: Creating dialog [%s].", qml_name)
|
||||
path = os.path.join(PluginRegistry.getInstance().getPluginPath(self.getPluginId()), "resources", "qml", qml_name)
|
||||
plugin_path = PluginRegistry.getInstance().getPluginPath(self.getPluginId())
|
||||
if not plugin_path:
|
||||
return None
|
||||
path = os.path.join(plugin_path, "resources", "qml", qml_name)
|
||||
dialog = self._application.createQmlComponent(path, {"toolbox": self})
|
||||
return dialog
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue