Skip to content
Permalink
Browse files
Merge pull request #370 from slarosa/osm_plugin_issue
fixes issues for OSM plugin generated from api cleanup commit
  • Loading branch information
mach0 committed Jan 3, 2013
2 parents 71580df + 90ef576 commit b48ae8b280849a00c9a529b896d627a4d755cad9
Showing with 6 additions and 6 deletions.
  1. +4 −4 python/plugins/osm/OsmDatabaseManager.py
  2. +1 −1 python/plugins/osm/OsmDownloadDlg.py
  3. +1 −1 python/plugins/osm/OsmFeatureDW.py
@@ -168,22 +168,22 @@ def layerRemoved(self,layerID):
key=dbFileName.toLatin1().data()

# remove map layers that belong to dbFileName database
if key in self.lineLayers.keys() and layer.id()==self.lineLayers[key].getLayerID():
if key in self.lineLayers.keys() and layer.id()==self.lineLayers[key].id():
del self.lineLayers[key]

elif key in self.pointLayers.keys() and layer.id()==self.pointLayers[key].id():
del self.pointLayers[key]
if key in self.lineLayers.keys():
if self.lineLayers[key]:
lineLayID=self.lineLayers[key].id()
self.mapReg.removeMapLayer(lineLayID,True)
self.mapReg.removeMapLayers([lineLayID],True)

elif key in self.polygonLayers.keys() and layer.id()==self.polygonLayers[key].id():
del self.polygonLayers[key]
if key in self.pointLayers.keys():
if self.pointLayers[key]:
pointLayID=self.pointLayers[key].id()
self.mapReg.removeMapLayer(pointLayID,True)
self.mapReg.removeMapLayers([pointLayID],True)

if key in self.dbConns.keys():
del self.dbConns[key]
@@ -202,7 +202,7 @@ def removeAllOsmLayers(self):
continue

if layer.type()==QgsMapLayer.VectorLayer and layer.dataProvider().name()=="osm":
QgsMapLayerRegistry.instance().removeMapLayer(layer.id(),True)
QgsMapLayerRegistry.instance().removeMapLayers([layer.id()],True)

self.dbConns={} # map dbFileName->sqlite3ConnectionObject
self.pointLayers={}
@@ -90,7 +90,7 @@ def __init__(self, plugin):
# check whether the extent needs to be projected back to WGS84
mapRenderer = plugin.canvas.mapRenderer()
if mapRenderer.hasCrsTransformEnabled():
crsMap=mapRenderer.destinationSrs()
crsMap=mapRenderer.destinationCrs()
crsWgs84=QgsCoordinateReferenceSystem(4326)
xform=QgsCoordinateTransform(crsMap, crsWgs84)
currentExtent=xform.transformBoundingBox(currentExtent)
@@ -207,7 +207,7 @@ def projectionChanged(self):

renderer = self.plugin.canvas.mapRenderer()
if renderer.hasCrsTransformEnabled():
self.coordXform = QgsCoordinateTransform(renderer.destinationSrs(), QgsCoordinateReferenceSystem(4326))
self.coordXform = QgsCoordinateTransform(renderer.destinationCrs(), QgsCoordinateReferenceSystem(4326))
else:
self.coordXform = None

0 comments on commit b48ae8b

Please sign in to comment.