Skip to content
Permalink
Browse files

[DbManager] give materialized views their own icon

  • Loading branch information
SebDieBln authored and brushtyler committed Jan 26, 2016
1 parent 5087811 commit 990261331d56909dfc59aa908ce39061033a9e92
@@ -227,6 +227,7 @@ def __init__(self, table, parent):
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 @@ def icon(self):
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):
Binary file not shown.
@@ -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>

0 comments on commit 9902613

Please sign in to comment.
You can’t perform that action at this time.