Skip to content

Commit

Permalink
Option to toggle showing debug and commands in execution dialog's log…
Browse files Browse the repository at this point in the history
… panel.

git-svn-id: http://sextante.googlecode.com/svn/trunk/soft/bindings/qgis-plugin@337 881b9c09-3ef8-f3c2-ec3d-21d735c97f4d
  • Loading branch information
cpolymeris@gmail.com committed Aug 6, 2012
1 parent 083f3e4 commit 0b22244
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/sextante/core/SextanteConfig.py
Expand Up @@ -15,6 +15,7 @@ class SextanteConfig():
USE_FILENAME_AS_LAYER_NAME = "USE_FILENAME_AS_LAYER_NAME"
KEEP_DIALOG_OPEN = "KEEP_DIALOG_OPEN"
USE_THREADS = "USE_THREADS"
SHOW_DEBUG_IN_DIALOG = "SHOW_DEBUG_IN_DIALOG"

settings = {}
settingIcons= {}
Expand All @@ -24,6 +25,7 @@ def initialize():
icon = QtGui.QIcon(os.path.dirname(__file__) + "/../images/alg.png")
SextanteConfig.settingIcons["General"] = icon
SextanteConfig.addSetting(Setting("General", SextanteConfig.USE_THREADS, "Run algorithms in a new thread (still unstable)", False))
SextanteConfig.addSetting(Setting("General", SextanteConfig.SHOW_DEBUG_IN_DIALOG, "Show debug information and commands executed in the execution dialog's Log panel (threaded execution only)", True))
SextanteConfig.addSetting(Setting("General", SextanteConfig.KEEP_DIALOG_OPEN, "Keep dialog open after running an algorithm", False))
SextanteConfig.addSetting(Setting("General", SextanteConfig.USE_SELECTED, "Use only selected features in external applications", True))
SextanteConfig.addSetting(Setting("General", SextanteConfig.TABLE_LIKE_PARAM_PANEL, "Show table-like parameter panels", False))
Expand Down Expand Up @@ -120,4 +122,4 @@ def __init__(self, group, name, description, default):
self.value = default

def __str__(self):
return self.name + "=" + str(self.value)
return self.name + "=" + str(self.value)
5 changes: 3 additions & 2 deletions src/sextante/gui/AlgorithmExecutionDialog.py
Expand Up @@ -206,8 +206,9 @@ def accept(self):
self.algEx.textChanged.connect(self.setText)
self.algEx.iterated.connect(self.iterate)
self.algEx.infoSet.connect(self.setInfo)
self.algEx.commandSet.connect(self.setCommand)
self.algEx.debugInfoSet.connect(self.setDebugInfo)
if SextanteConfig.getSetting(SextanteConfig.SHOW_DEBUG_IN_DIALOG):
self.algEx.commandSet.connect(self.setCommand)
self.algEx.debugInfoSet.connect(self.setDebugInfo)
self.algEx.start()
self.setInfo("<b>Algorithm %s started</b>" % self.alg.name)
self.buttonBox.button(QtGui.QDialogButtonBox.Cancel).setEnabled(True)
Expand Down

0 comments on commit 0b22244

Please sign in to comment.