Skip to content

Commit 6d2ee69

Browse files
author
volayaf@gmail.com
committedMay 28, 2012
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
1 parent 007d02e commit 6d2ee69

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed
 

‎src/sextante/core/Sextante.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ def addProvider(provider):
4747
#Should think of a different solution
4848
provider.initializeSettings()
4949
Sextante.providers.append(provider)
50+
SextanteConfig.loadSettings()
5051
Sextante.updateAlgsList()
5152

5253
@staticmethod
@@ -56,6 +57,7 @@ def removeProvider(provider):
5657
try:
5758
provider.unload()
5859
Sextante.providers.remove(provider)
60+
SextanteConfig.loadSettings()
5961
Sextante.updateAlgsList()
6062
except:
6163
pass #This try catch block is here to avoid problems if the plugin with a provider is unloaded

‎src/sextante/gui/ConfigDialog.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
from PyQt4.QtGui import *
33
from PyQt4 import QtCore, QtGui
44
from sextante.core.SextanteConfig import SextanteConfig
5+
from sextante.core.Sextante import Sextante
6+
from sextante.core.SextanteUtils import SextanteUtils
57

68

79
class ConfigDialog(QtGui.QDialog):
@@ -32,10 +34,19 @@ def setupUi(self):
3234
self.tree.header().setResizeMode(1, QtGui.QHeaderView.Stretch)
3335
self.fillTree()
3436
self.verticalLayout.addWidget(self.tree)
37+
self.horizontalLayout = QtGui.QHBoxLayout()
38+
self.horizontalLayout.setSpacing(2)
39+
self.horizontalLayout.setMargin(0)
3540
self.buttonBox = QtGui.QDialogButtonBox()
3641
self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
3742
self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
38-
self.verticalLayout.addWidget(self.buttonBox)
43+
if SextanteUtils.isWindows():
44+
self.externalAppsButton = QtGui.QPushButton()
45+
self.externalAppsButton.setText("Configure external apps")
46+
self.horizontalLayout.addWidget(self.externalAppsButton)
47+
self.horizontalLayout.addSpacing(100)
48+
self.horizontalLayout.addWidget(self.buttonBox)
49+
self.verticalLayout.addLayout(self.horizontalLayout)
3950
self.setLayout(self.verticalLayout)
4051
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL("accepted()"), self.okPressed)
4152
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL("rejected()"), self.cancelPressed)

0 commit comments

Comments
 (0)
Please sign in to comment.