Skip to content
Permalink
Browse files
[processing] fixed ‘add script from file’ tool
  • Loading branch information
volaya committed May 21, 2015
1 parent a58085b commit 4d62566db702843f78154e76d0d3bc3e65c8556c
Showing with 3 additions and 3 deletions.
  1. +3 −3 python/plugins/processing/script/AddScriptFromFileAction.py
@@ -28,6 +28,7 @@
import os

from PyQt4.QtGui import QFileDialog, QIcon, QMessageBox
from PyQt4.QtCore import QSettings, QFileInfo

from processing.script.ScriptAlgorithm import ScriptAlgorithm
from processing.gui.ToolboxAction import ToolboxAction
@@ -50,13 +51,12 @@ def execute(self):
settings = QSettings()
lastDir = settings.value('Processing/lastScriptsDir', '')
filename = QFileDialog.getOpenFileName(self.toolbox,
self.tr('Script files', 'AddScriptFromFileAction'), None,
self.tr('Script files', 'AddScriptFromFileAction'), lastDir,
self.tr('Script files (*.py *.PY)', 'AddScriptFromFileAction'))
if filename:
try:
settings.setValue('Processing/lastScriptsDir',
QFileInfo(fileName).absoluteDir().absolutePath())

QFileInfo(filename).absoluteDir().absolutePath())
script = ScriptAlgorithm(filename)
except WrongScriptException:
QMessageBox.warning(self.toolbox,

1 comment on commit 4d62566

@luipir

This comment has been minimized.

Copy link
Contributor

@luipir luipir commented on 4d62566 May 21, 2015

;)

Please sign in to comment.