Skip to content

Commit fcc51bc

Browse files
author
Sandro Santilli
committedJul 2, 2015
DBManager topoviewer: don't be fooled by srid=-1 in topology.topology
Fixes #12802
1 parent 76bda5e commit fcc51bc

File tree

1 file changed

+5
-1
lines changed
  • python/plugins/db_manager/db_plugins/postgis/plugins/qgis_topoview

1 file changed

+5
-1
lines changed
 

‎python/plugins/db_manager/db_plugins/postgis/plugins/qgis_topoview/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,11 @@ def run(item, action, mainwindow):
8686
mainwindow.iface.messageTimeout())
8787
return False
8888

89-
toposrid = str(res[0])
89+
if ( res[0] < 0 ):
90+
mainwindow.infoBar.pushMessage("WARNING", u'Topology "{0}" is registered as having a srid of {1} in topology.topology, we will assume 0 (for unknown)'.format(item.schema().name, res[0]), QgsMessageBar.WARNING, mainwindow.iface.messageTimeout())
91+
toposrid = '0'
92+
else:
93+
toposrid = str(res[0])
9094

9195
# load layers into the current project
9296
toponame = item.schema().name

0 commit comments

Comments
 (0)
Please sign in to comment.