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

Fixes #12802
This commit is contained in:
Sandro Santilli 2015-07-02 11:02:04 +02:00
parent 76bda5e352
commit fcc51bcd8c

View File

@ -86,7 +86,11 @@ def run(item, action, mainwindow):
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