diff --git a/document_management_system/gui/relation_editor_document_side_widget.py b/document_management_system/gui/relation_editor_document_side_widget.py index 5e486cd..00d5ec4 100644 --- a/document_management_system/gui/relation_editor_document_side_widget.py +++ b/document_management_system/gui/relation_editor_document_side_widget.py @@ -36,6 +36,7 @@ QgsGeometry, QgsFeature, QgsFeatureRequest, + QgsIconUtils, QgsVectorLayerUtils ) from qgis.gui import ( @@ -206,6 +207,7 @@ def updateUiManyToOnePolymorphic(self): treeWidgetItemLayer = QTreeWidgetItem(self.mFeaturesTreeWidget, [layer.name()]) treeWidgetItemLayer.setData(0, TreeWidgetItemRole.Type, TreeWidgetItemType.Layer) treeWidgetItemLayer.setData(0, TreeWidgetItemRole.Layer, layer) + treeWidgetItemLayer.setIcon(0, QgsIconUtils.iconForLayer(layer)) for feature in layerFeature[layer]: treeWidgetItem = QTreeWidgetItem(treeWidgetItemLayer, [str(feature.id())]) treeWidgetItem.setData(0, TreeWidgetItemRole.Type, TreeWidgetItemType.Feature) @@ -236,6 +238,7 @@ def updateUiManyToManyPolymorphic(self): treeWidgetItemLayer = QTreeWidgetItem(self.mFeaturesTreeWidget, [layer.name()]) treeWidgetItemLayer.setData(0, TreeWidgetItemRole.Type, TreeWidgetItemType.Layer) treeWidgetItemLayer.setData(0, TreeWidgetItemRole.Layer, layer) + treeWidgetItemLayer.setIcon(0, QgsIconUtils.iconForLayer(layer)) for feature, linkFeature in layerFeature[layer]: treeWidgetItem = QTreeWidgetItem(treeWidgetItemLayer, [str(feature.id())]) treeWidgetItem.setData(0, TreeWidgetItemRole.Type, TreeWidgetItemType.Feature)