Bug fixes: Don't show profile delete on first run, don't show advanced box in non-advanced mode
This commit is contained in:
parent
25eff0d34f
commit
6b1ade8c4a
2 changed files with 11 additions and 10 deletions
6
menus.py
6
menus.py
|
@ -517,7 +517,7 @@ class PesterChooseProfile(QtGui.QDialog):
|
|||
self.cancel = QtGui.QPushButton("CANCEL", self)
|
||||
self.connect(self.cancel, QtCore.SIGNAL('clicked()'),
|
||||
self, QtCore.SLOT('reject()'))
|
||||
if not collision:
|
||||
if not collision and avail_profiles:
|
||||
self.delete = QtGui.QPushButton("DELETE", self)
|
||||
self.connect(self.delete, QtCore.SIGNAL('clicked()'),
|
||||
self, QtCore.SLOT('deleteProfile()'))
|
||||
|
@ -537,7 +537,7 @@ class PesterChooseProfile(QtGui.QDialog):
|
|||
layout_0.addWidget(profileLabel)
|
||||
layout_0.addWidget(self.profileBox)
|
||||
layout_0.addLayout(layout_ok)
|
||||
if not collision:
|
||||
if not collision and avail_profiles:
|
||||
layout_0.addWidget(self.delete)
|
||||
layout_0.addLayout(layout_2)
|
||||
self.errorMsg = QtGui.QLabel(self)
|
||||
|
@ -598,7 +598,6 @@ class PesterChooseProfile(QtGui.QDialog):
|
|||
problem.setInformativeText("There was a problem deleting the profile: %s" % (handle))
|
||||
problem.setStandardButtons(QtGui.QMessageBox.Ok)
|
||||
problem.exec_()
|
||||
self.reject()
|
||||
|
||||
class PesterOptions(QtGui.QDialog):
|
||||
def __init__(self, config, theme, parent):
|
||||
|
@ -737,6 +736,7 @@ class PesterOptions(QtGui.QDialog):
|
|||
layout_close.addWidget(QtGui.QLabel("Close"))
|
||||
layout_close.addWidget(self.closeBox)
|
||||
|
||||
if parent.advanced:
|
||||
self.modechange = QtGui.QLineEdit(self)
|
||||
layout_change = QtGui.QHBoxLayout()
|
||||
layout_change.addWidget(QtGui.QLabel("Change:"))
|
||||
|
|
|
@ -2474,6 +2474,7 @@ class PesterWindow(MovingWindow):
|
|||
self.config.set('opvMessages', opvmesssetting)
|
||||
# advanced
|
||||
## user mode
|
||||
if self.advanced:
|
||||
newmodes = self.optionmenu.modechange.text()
|
||||
if newmodes:
|
||||
self.setChannelMode.emit(self.profile().handle, newmodes, "")
|
||||
|
|
Loading…
Reference in a new issue