Skip to content

Commit

Permalink
use last used encoding if none specified
Browse files Browse the repository at this point in the history
git-svn-id: http://sextante.googlecode.com/svn/trunk/soft/bindings/qgis-plugin@351 881b9c09-3ef8-f3c2-ec3d-21d735c97f4d
  • Loading branch information
alexander.bruy@gmail.com committed Aug 17, 2012
1 parent 76129e7 commit 5a0f357
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/sextante/outputs/OutputVector.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

class OutputVector(Output):

encoding = None

def getFileFilter(self,alg):
exts = alg.provider.getSupportedOutputVectorLayerExtensions()
for i in range(len(exts)):
Expand Down Expand Up @@ -33,6 +35,10 @@ def getVectorWriter(self, fields, geomType, crs, options=None):
@return writer instance of the vectoe writer class
'''

if self.encoding is None:
settings = QSettings()
self.encoding = settings.value("/SextanteQGIS/encoding", "System").toString()

w = SextanteVectorWriter(self.value, self.encoding, fields, geomType, crs, options)
self.memoryLayer = w.memLayer
return w

0 comments on commit 5a0f357

Please sign in to comment.