Skip to content

Commit

Permalink
DBManager topoviewer: don't be fooled by srid=-1 in topology.topology
Browse files Browse the repository at this point in the history
Fixes #12802
  • Loading branch information
Sandro Santilli committed Jul 2, 2015
1 parent 1418fdb commit a4e629b
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a4e629b

Please sign in to comment.