Commit 3e006dc5 authored by Thomas Vincent's avatar Thomas Vincent

remove duplicated attribute/variable

parent 473ef09b
......@@ -723,16 +723,13 @@ class ShiftWidget(Qt.QMainWindow):
self.__setPanel.setSnapToPoint(True)
self.__setPanel.plot().setPointSelectionEnabled(True)
linearShiftBn = Qt.QPushButton('Apply linear shift')
self.__linearShiftBn = linearShiftBn
linearShiftWholeRangeBn = Qt.QPushButton('Apply linear shift on whole range')
self.__linearShiftWholeRangeBn = linearShiftWholeRangeBn
self.__linearShiftBn = Qt.QPushButton('Apply linear shift')
self.__linearShiftWholeRangeBn = Qt.QPushButton('Apply linear shift on whole range')
resetShiftBn = Qt.QPushButton('Reset entry shift')
resetAllShiftBn = Qt.QPushButton('Reset ALL shifts')
linearShiftBn.setEnabled(False)
linearShiftWholeRangeBn.setEnabled(False)
# resetShiftBn.setEnabled(False)
# resetAllShiftBn.setEnabled(False)
self.__linearShiftBn.setEnabled(False)
self.__linearShiftWholeRangeBn.setEnabled(False)
setSubGroup = GroupBox('Set')
layout = Qt.QVBoxLayout(setSubGroup)
layout.addWidget(self.__setPanel)
......@@ -740,8 +737,8 @@ class ShiftWidget(Qt.QMainWindow):
bnBase = Qt.QWidget()
bnBase.setContentsMargins(0, 0, 0, 0)
bnLayout = Qt.QHBoxLayout(bnBase)
bnLayout.addWidget(linearShiftBn, alignment=Qt.Qt.AlignCenter)
bnLayout.addWidget(linearShiftWholeRangeBn, alignment=Qt.Qt.AlignCenter)
bnLayout.addWidget(self.__linearShiftBn, alignment=Qt.Qt.AlignCenter)
bnLayout.addWidget(self.__linearShiftWholeRangeBn, alignment=Qt.Qt.AlignCenter)
bnLayout.addWidget(resetShiftBn, alignment=Qt.Qt.AlignCenter)
bnLayout.addWidget(resetAllShiftBn, alignment=Qt.Qt.AlignCenter)
layout.addWidget(bnBase, alignment=Qt.Qt.AlignCenter)
......@@ -806,8 +803,9 @@ class ShiftWidget(Qt.QMainWindow):
# signal triggered when a shift value is changed
self.__shiftSubject.sigShiftChanged.connect(self.__updateShiftPlot)
linearShiftBn.clicked.connect(self.__slotLinearShiftClicked)
linearShiftWholeRangeBn.clicked.connect(self.__slotLinearShiftWholeRangeClicked)
self.__linearShiftBn.clicked.connect(self.__slotLinearShiftClicked)
self.__linearShiftWholeRangeBn.clicked.connect(
self.__slotLinearShiftWholeRangeClicked)
resetShiftBn.clicked.connect(self.__slotResetShiftClicked)
resetAllShiftBn.clicked.connect(self.__slotResetAllShiftClicked)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment