summaryrefslogtreecommitdiff
path: root/silx/gui/fit/FitConfig.py
diff options
context:
space:
mode:
authorAlexandre Marie <alexandre.marie@synchrotron-soleil.fr>2018-12-17 12:28:24 +0100
committerAlexandre Marie <alexandre.marie@synchrotron-soleil.fr>2018-12-17 12:28:24 +0100
commitcebdc9244c019224846cb8d2668080fe386a6adc (patch)
treeaedec55da0f9dd4fc4d6c7eb0f58489a956e2e8c /silx/gui/fit/FitConfig.py
parent159ef14fb9e198bb0066ea14e6b980f065de63dd (diff)
New upstream version 0.9.0+dfsg
Diffstat (limited to 'silx/gui/fit/FitConfig.py')
-rw-r--r--silx/gui/fit/FitConfig.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/silx/gui/fit/FitConfig.py b/silx/gui/fit/FitConfig.py
index 04e411b..479e469 100644
--- a/silx/gui/fit/FitConfig.py
+++ b/silx/gui/fit/FitConfig.py
@@ -1,6 +1,6 @@
# coding: utf-8
# /*##########################################################################
-# Copyright (C) 2004-2016 V.A. Sole, European Synchrotron Radiation Facility
+# Copyright (C) 2004-2018 V.A. Sole, European Synchrotron Radiation Facility
#
# This file is part of the PyMca X-ray Fluorescence Toolkit developed at
# the ESRF by the Software group.
@@ -60,7 +60,7 @@ class TabsDialog(qt.QDialog):
# layout2.addWidget(self.buttonHelp)
self.buttonDefault = qt.QPushButton(self)
- self.buttonDefault.setText("Default")
+ self.buttonDefault.setText("Undo changes")
layout2.addWidget(self.buttonDefault)
spacer = qt.QSpacerItem(20, 20,
@@ -138,7 +138,7 @@ class TabsDialogData(TabsDialog):
self.default = {} if default is None else default
- self.buttonDefault.clicked.connect(self.setDefault)
+ self.buttonDefault.clicked.connect(self._resetDefault)
# self.keyPressEvent(qt.Qt.Key_Enter).
def keyPressEvent(self, event):
@@ -174,6 +174,9 @@ class TabsDialogData(TabsDialog):
self.setDefault()
super(TabsDialogData, self).reject()
+ def _resetDefault(self, checked):
+ self.setDefault()
+
def setDefault(self, newdefault=None):
"""Reinitialize :attr:`output` with :attr:`default` or with
new dictionary ``newdefault`` if provided.