Skip to content

Commit

Permalink
Fixed #6619
Browse files Browse the repository at this point in the history
  • Loading branch information
volaya committed Nov 11, 2012
1 parent 8914e7d commit 5c88719
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion python/plugins/sextante/r/EditRScriptDialog.py
Expand Up @@ -88,7 +88,7 @@ def editHelp(self):

def saveAlgorithm(self):
if self.filename is None:
self.filename = QtGui.QFileDialog.getSaveFileName(self, "Save Script", RUtils.RScriptsFolder(), "SEXTANTE R script (*.rsx)")
self.filename = str(QtGui.QFileDialog.getSaveFileName(self, "Save Script", RUtils.RScriptsFolder(), "SEXTANTE R script (*.rsx)"))

if self.filename:
if not self.filename.endswith(".rsx"):
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/sextante/saga/SplitRGBBands.py
Expand Up @@ -43,7 +43,7 @@ def getIcon(self):
return QtGui.QIcon(os.path.dirname(__file__) + "/../images/saga.png")

def defineCharacteristics(self):
self.name = "Split RGB band"
self.name = "Split RGB bands"
self.group = "Grid - Tools"
self.addParameter(ParameterRaster(SplitRGBBands.INPUT, "Input layer", False))
self.addOutput(OutputRaster(SplitRGBBands.R, "Output R band layer"))
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/sextante/script/EditScriptDialog.py
Expand Up @@ -88,7 +88,7 @@ def editHelp(self):

def saveAlgorithm(self):
if self.filename is None:
self.filename = QtGui.QFileDialog.getSaveFileName(self, "Save Script", ScriptUtils.scriptsFolder(), "Python scripts (*.py)")
self.filename = str(QtGui.QFileDialog.getSaveFileName(self, "Save Script", ScriptUtils.scriptsFolder(), "Python scripts (*.py)"))

if self.filename:
if not self.filename.endswith(".py"):
Expand Down
@@ -0,0 +1,11 @@
##input=vector
##cellsize=number 1000.0
##grid=output vector
from sextante.core.QGisLayers import QGisLayers

input = QGisLayers.getObjectFromUri(input)
centerx = (input.extent().xMinimum() + input.extent().xMaximum()) / 2
centery = (input.extent().yMinimum() + input.extent().yMaximum()) / 2
width = (input.extent().xMaximum() - input.extent().xMinimum())
height = (input.extent().yMaximum() - input.extent().yMinimum())
Sextante.runalg("mmqgisx:creategrid", cellsize, cellsize, width, height, centerx, centery, 3, grid)

0 comments on commit 5c88719

Please sign in to comment.