Skip to content

Commit

Permalink
Fix layer visibility settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Sandro Santilli committed Nov 7, 2012
1 parent 3c5de39 commit 44753cb
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,32 +110,32 @@ 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.setLayerVisible(layer, False)
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.setLayerVisible(layer, False)
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.setLayerVisible(layer, False)
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.setLayerVisible(layer, False)
legend.moveLayer(layer, group)

# next_left
Expand Down

0 comments on commit 44753cb

Please sign in to comment.