Skip to content
Permalink
Browse files

Start all topology layers as invisible (it may cost really a lot to v…

…isualize...)
  • Loading branch information
Sandro Santilli
Sandro Santilli committed Nov 5, 2012
1 parent 83f2b2d commit cd69be6e1d423a287b83c59ae398f720497e1892
Showing with 4 additions and 0 deletions.
  1. +4 −0 python/plugins/db_manager/db_plugins/postgis/plugins/qgis_topoview/__init__.py
@@ -110,27 +110,31 @@ def run(item, action, mainwindow):
uri.setDataSource(toponame, 'node', 'geom', '', 'node_id')
layer = QgsVectorLayer(uri.uri(), u'%s.nodes' % toponame, provider)
layer.loadNamedStyle(os.path.join(template_dir, 'node.qml'))
legend.setLayerVisible(layer, False)
registry.addMapLayer(layer)
legend.moveLayer(layer, group)

# edge
uri.setDataSource(toponame, 'edge_data', 'geom', '', 'edge_id')
layer = QgsVectorLayer(uri.uri(), u'%s.edges' % toponame, provider)
layer.loadNamedStyle(os.path.join(template_dir, 'edge_style.qml'))
legend.setLayerVisible(layer, False)
registry.addMapLayer(layer)
legend.moveLayer(layer, group)

# face_left
uri.setDataSource(toponame, 'edge_data', 'geom', '', 'edge_id')
layer = QgsVectorLayer(uri.uri(), u'%s.face_left' % toponame, provider)
layer.loadNamedStyle(os.path.join(template_dir, 'face_left.qml'))
legend.setLayerVisible(layer, False)
registry.addMapLayer(layer)
legend.moveLayer(layer, group)

# face_right
uri.setDataSource(toponame, 'edge_data', 'geom', '', 'edge_id')
layer = QgsVectorLayer(uri.uri(), u'%s.face_right' % toponame, provider)
layer.loadNamedStyle(os.path.join(template_dir, 'face_right.qml'))
legend.setLayerVisible(layer, False)
registry.addMapLayer(layer)
legend.moveLayer(layer, group)

0 comments on commit cd69be6

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