From 426a83260f694fa47d9d1d2b792f9214e00f110f Mon Sep 17 00:00:00 2001 From: Nicart Date: Mon, 22 Feb 2016 14:52:27 +0100 Subject: [PATCH] vector layer same name as file --- historical_map.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/historical_map.py b/historical_map.py index ca34247..9e88387 100644 --- a/historical_map.py +++ b/historical_map.py @@ -442,7 +442,8 @@ def runClassify(self): classifyProgress.addStep() # Add layer - self.iface.addVectorLayer(temp,'Vectorized class','ogr') + layerName=os.path.basename(os.path.splitext(temp)[0]) + self.iface.addVectorLayer(temp,layerName,'ogr') self.iface.messageBar().pushMessage("New vector : ",outShp, 3, duration=10) classifyProgress.reset()