Skip to content
Permalink
Browse files
fix #6932 (due to deprecated getLayerID method removal)
  • Loading branch information
brushtyler committed Dec 31, 2012
1 parent c57271c commit 62d99772e11c1cae92793377335968536263062c
@@ -164,7 +164,7 @@ def layerAdded(self, layer):
self.emit( SIGNAL( "layersChanged" ) )

def removeLayer(self, layerId):
LayerRegistry.layers = filter( lambda x: x.getLayerID() != layerId, LayerRegistry.layers)
LayerRegistry.layers = filter( lambda x: x.id() != layerId, LayerRegistry.layers)
self.emit( SIGNAL( "layersChanged" ) )

def removeAllLayers(self):
@@ -167,8 +167,8 @@ def setLayer(self, layer=None):
prevFn, prevLayer = self.filename(), self.layer()

if isinstance(layer, QgsMapLayer):
if self.combo.findData(layer.getLayerID()) >= 0:
index = self.combo.findData( layer.getLayerID() )
if self.combo.findData(layer.id()) >= 0:
index = self.combo.findData( layer.id() )
self.combo.setCurrentIndex( index )
else:
self.combo.setCurrentIndex( -1 )
@@ -199,7 +199,7 @@ def setLayers(self, layers=None):

self.combo.clear()
for l in layers:
self.combo.addItem( l.name(), l.getLayerID() )
self.combo.addItem( l.name(), l.id() )

self.restoreComboState()
self.blockSignals( False )

0 comments on commit 62d9977

Please sign in to comment.