Skip to content

Commit

Permalink
Layer type icon in document side widget
Browse files Browse the repository at this point in the history
  • Loading branch information
domi4484 committed Aug 24, 2021
1 parent 57f3cd0 commit e915270
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
QgsGeometry,
QgsFeature,
QgsFeatureRequest,
QgsIconUtils,
QgsVectorLayerUtils
)
from qgis.gui import (
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit e915270

Please sign in to comment.