mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
[DbManager] give materialized views their own icon
This commit is contained in:
parent
50878114a7
commit
990261331d
@ -227,6 +227,7 @@ class TableItem(TreeItem):
|
||||
if not hasattr(TableItem, 'tableIcon'):
|
||||
TableItem.tableIcon = QIcon(":/db_manager/icons/table.png")
|
||||
TableItem.viewIcon = QIcon(":/db_manager/icons/view.png")
|
||||
TableItem.viewMaterializedIcon = QIcon(":/db_manager/icons/view_materialized.png")
|
||||
TableItem.layerPointIcon = QIcon(":/db_manager/icons/layer_point.png")
|
||||
TableItem.layerLineIcon = QIcon(":/db_manager/icons/layer_line.png")
|
||||
TableItem.layerPolygonIcon = QIcon(":/db_manager/icons/layer_polygon.png")
|
||||
@ -257,7 +258,10 @@ class TableItem(TreeItem):
|
||||
return self.layerRasterIcon
|
||||
|
||||
if self.getItemData().isView:
|
||||
return self.viewIcon
|
||||
if hasattr(self.getItemData(), '_relationType') and self.getItemData()._relationType == 'm':
|
||||
return self.viewMaterializedIcon
|
||||
else:
|
||||
return self.viewIcon
|
||||
return self.tableIcon
|
||||
|
||||
def path(self):
|
||||
|
BIN
python/plugins/db_manager/icons/view_materialized.png
Normal file
BIN
python/plugins/db_manager/icons/view_materialized.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 471 B |
@ -13,6 +13,7 @@
|
||||
<file>icons/user.xpm</file>
|
||||
<file>icons/users.xpm</file>
|
||||
<file>icons/view.png</file>
|
||||
<file>icons/view_materialized.png</file>
|
||||
<file alias="warning">icons/warning-20px.png</file>
|
||||
<file>icons/plugged.png</file>
|
||||
<file>icons/unplugged.png</file>
|
||||
|
Loading…
x
Reference in New Issue
Block a user