[update] leave rename phase mode when picking initiated
This commit is contained in:
parent
f4839bb609
commit
de8886b73b
@ -1 +1 @@
|
|||||||
1c51-dirty
|
f483-dirty
|
||||||
|
@ -1679,6 +1679,8 @@ class PickDlg(QDialog):
|
|||||||
self.deactivatePicking()
|
self.deactivatePicking()
|
||||||
|
|
||||||
def activatePicking(self):
|
def activatePicking(self):
|
||||||
|
self.leave_rename_phase()
|
||||||
|
self.renamePhaseAction.setEnabled(False)
|
||||||
phase = self.currentPhase
|
phase = self.currentPhase
|
||||||
phaseID = self.getPhaseID(phase)
|
phaseID = self.getPhaseID(phase)
|
||||||
if not phaseID:
|
if not phaseID:
|
||||||
@ -1709,6 +1711,7 @@ class PickDlg(QDialog):
|
|||||||
|
|
||||||
self.disconnectPressEvent()
|
self.disconnectPressEvent()
|
||||||
self.multicompfig.connectEvents()
|
self.multicompfig.connectEvents()
|
||||||
|
self.renamePhaseAction.setEnabled(True)
|
||||||
self.connect_pick_delete()
|
self.connect_pick_delete()
|
||||||
self.draw()
|
self.draw()
|
||||||
|
|
||||||
@ -2034,7 +2037,7 @@ class PickDlg(QDialog):
|
|||||||
self.disconnectPressEvent()
|
self.disconnectPressEvent()
|
||||||
self.enable_ar_buttons()
|
self.enable_ar_buttons()
|
||||||
self.zoomAction.setEnabled(True)
|
self.zoomAction.setEnabled(True)
|
||||||
#self.pick_block = self.togglePickBlocker()
|
#self.pick_block = self.togglPickBlocker()
|
||||||
self.leave_picking_mode()
|
self.leave_picking_mode()
|
||||||
|
|
||||||
def savePick(self, phase, phasepicks):
|
def savePick(self, phase, phasepicks):
|
||||||
@ -2219,9 +2222,7 @@ class PickDlg(QDialog):
|
|||||||
except KeyError as e:
|
except KeyError as e:
|
||||||
QtGui.QMessageBox.warning(self, 'Could not rename phase',
|
QtGui.QMessageBox.warning(self, 'Could not rename phase',
|
||||||
'Could not rename phase {} to {}: {}'.format(phase, new_phase, e))
|
'Could not rename phase {} to {}: {}'.format(phase, new_phase, e))
|
||||||
self.renamePhaseAction.setChecked(False)
|
self.leave_rename_phase()
|
||||||
self.multicompfig.set_frame_color()
|
|
||||||
self.multicompfig.connectEvents()
|
|
||||||
self.refreshPlot()
|
self.refreshPlot()
|
||||||
|
|
||||||
def renamePhaseInDict(self, picks, phase_old, phase_new):
|
def renamePhaseInDict(self, picks, phase_old, phase_new):
|
||||||
@ -2233,6 +2234,11 @@ class PickDlg(QDialog):
|
|||||||
picks.pop(phase_old)
|
picks.pop(phase_old)
|
||||||
self.setDirty(True)
|
self.setDirty(True)
|
||||||
|
|
||||||
|
def leave_rename_phase(self):
|
||||||
|
self.renamePhaseAction.setChecked(False)
|
||||||
|
self.multicompfig.set_frame_color()
|
||||||
|
self.multicompfig.connectEvents()
|
||||||
|
|
||||||
def remove_pick_by_x(self, x):
|
def remove_pick_by_x(self, x):
|
||||||
if not self.picks and not self.autopicks:
|
if not self.picks and not self.autopicks:
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user