diff --git a/src/Mod/BIM/bimcommands/BimClassification.py b/src/Mod/BIM/bimcommands/BimClassification.py index c66a175728..035099883e 100644 --- a/src/Mod/BIM/bimcommands/BimClassification.py +++ b/src/Mod/BIM/bimcommands/BimClassification.py @@ -25,8 +25,10 @@ import FreeCAD import FreeCADGui +import os QT_TRANSLATE_NOOP = FreeCAD.Qt.QT_TRANSLATE_NOOP +translate = FreeCAD.Qt.translate class BIM_Classification: @@ -52,7 +54,7 @@ class BIM_Classification: def Activated(self): import Draft from PySide import QtCore, QtGui - import BimMaterial + from bimcommands import BimMaterial # init checks if not hasattr(self, "Classes"): @@ -60,16 +62,8 @@ class BIM_Classification: self.isEditing = None # load the form and set the tree model up - self.form = FreeCADGui.PySideUic.loadUi( - os.path.join(os.path.dirname(__file__), "dialogClassification.ui") - ) - self.form.setWindowIcon( - QtGui.QIcon( - os.path.join( - os.path.dirname(__file__), "icons", "BIM_Classification.svg" - ) - ) - ) + self.form = FreeCADGui.PySideUic.loadUi(":/ui/dialogClassification.ui") + self.form.setWindowIcon(QtGui.QIcon(":/icons/BIM_Classification.svg")) # restore saved values p = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/BIM") diff --git a/src/Mod/BIM/bimcommands/BimIfcProperties.py b/src/Mod/BIM/bimcommands/BimIfcProperties.py index 793802febd..7d841b857b 100644 --- a/src/Mod/BIM/bimcommands/BimIfcProperties.py +++ b/src/Mod/BIM/bimcommands/BimIfcProperties.py @@ -140,7 +140,7 @@ class BIM_IfcProperties: ) # connect signals - self.form.tree.selectionModel.selectionChanged.connect(self.updateProperties) + self.form.tree.selectionModel().selectionChanged.connect(self.updateProperties) self.form.groupMode.currentIndexChanged.connect(self.update) self.form.onlyVisible.stateChanged.connect(self.onVisible) self.form.onlySelected.stateChanged.connect(self.onSelected)