Skip to content
Permalink
Browse files

DBManager topoviewer: don't be fooled by srid=-1 in topology.topology

Fixes #12802
  • Loading branch information
Sandro Santilli
Sandro Santilli committed Jul 2, 2015
1 parent 1418fdb commit a4e629b32afcb810a0d8b52b2cce6c3f0973fa61
@@ -81,7 +81,11 @@ def run(item, action, mainwindow):
mainwindow.infoBar.pushMessage("Invalid topology", u'Schema "{0}" is not registered in topology.topology.'.format(item.schema().name), QgsMessageBar.WARNING, mainwindow.iface.messageTimeout())
return False

toposrid = str(res[0])
if ( res[0] < 0 ):
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())
toposrid = '0'
else:
toposrid = str(res[0])

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

0 comments on commit a4e629b

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