Skip to content
Permalink
Browse files

fixed bug in settings when adding an external provider

git-svn-id: http://sextante.googlecode.com/svn/trunk/soft/bindings/qgis-plugin@193 881b9c09-3ef8-f3c2-ec3d-21d735c97f4d
  • Loading branch information
volayaf@gmail.com
volayaf@gmail.com committed May 28, 2012
1 parent 007d02e commit 6d2ee69472a94b08173a12c2a038ae8d0e8db69c
Showing with 14 additions and 1 deletion.
  1. +2 −0 src/sextante/core/Sextante.py
  2. +12 −1 src/sextante/gui/ConfigDialog.py
@@ -47,6 +47,7 @@ def addProvider(provider):
#Should think of a different solution
provider.initializeSettings()
Sextante.providers.append(provider)
SextanteConfig.loadSettings()
Sextante.updateAlgsList()

@staticmethod
@@ -56,6 +57,7 @@ def removeProvider(provider):
try:
provider.unload()
Sextante.providers.remove(provider)
SextanteConfig.loadSettings()
Sextante.updateAlgsList()
except:
pass #This try catch block is here to avoid problems if the plugin with a provider is unloaded
@@ -2,6 +2,8 @@
from PyQt4.QtGui import *
from PyQt4 import QtCore, QtGui
from sextante.core.SextanteConfig import SextanteConfig
from sextante.core.Sextante import Sextante
from sextante.core.SextanteUtils import SextanteUtils


class ConfigDialog(QtGui.QDialog):
@@ -32,10 +34,19 @@ def setupUi(self):
self.tree.header().setResizeMode(1, QtGui.QHeaderView.Stretch)
self.fillTree()
self.verticalLayout.addWidget(self.tree)
self.horizontalLayout = QtGui.QHBoxLayout()
self.horizontalLayout.setSpacing(2)
self.horizontalLayout.setMargin(0)
self.buttonBox = QtGui.QDialogButtonBox()
self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
self.verticalLayout.addWidget(self.buttonBox)
if SextanteUtils.isWindows():
self.externalAppsButton = QtGui.QPushButton()
self.externalAppsButton.setText("Configure external apps")
self.horizontalLayout.addWidget(self.externalAppsButton)
self.horizontalLayout.addSpacing(100)
self.horizontalLayout.addWidget(self.buttonBox)
self.verticalLayout.addLayout(self.horizontalLayout)
self.setLayout(self.verticalLayout)
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL("accepted()"), self.okPressed)
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL("rejected()"), self.cancelPressed)

0 comments on commit 6d2ee69

Please sign in to comment.
You can’t perform that action at this time.