mirror of https://gitlab.com/pamhyr/pamhyr2
Solver parameters: fix undo/redo command, double connection broke the normal operation of these commands
parent
80f0b181d1
commit
46d0f52b3e
|
|
@ -78,11 +78,6 @@ class SolverParametersWindow(PamhyrWindow):
|
||||||
for st in solver_type_list:
|
for st in solver_type_list:
|
||||||
self._undo_stack[st] = QUndoStack()
|
self._undo_stack[st] = QUndoStack()
|
||||||
|
|
||||||
self._undo_sc = QShortcut(QKeySequence.Undo, self)
|
|
||||||
self._redo_sc = QShortcut(QKeySequence.Redo, self)
|
|
||||||
self._undo_sc.activated.connect(self._undo)
|
|
||||||
self._redo_sc.activated.connect(self._redo)
|
|
||||||
|
|
||||||
def setup_table(self):
|
def setup_table(self):
|
||||||
self._table = {}
|
self._table = {}
|
||||||
self._tab_widget = self.find(QTabWidget, f"tabWidget")
|
self._tab_widget = self.find(QTabWidget, f"tabWidget")
|
||||||
|
|
@ -134,12 +129,10 @@ class SolverParametersWindow(PamhyrWindow):
|
||||||
def _undo(self):
|
def _undo(self):
|
||||||
tab = self.current_tab()
|
tab = self.current_tab()
|
||||||
self._table[tab].undo()
|
self._table[tab].undo()
|
||||||
self._set_current_reach()
|
|
||||||
|
|
||||||
def _redo(self):
|
def _redo(self):
|
||||||
tab = self.current_tab()
|
tab = self.current_tab()
|
||||||
self._table[tab].redo()
|
self._table[tab].redo()
|
||||||
self._set_current_reach()
|
|
||||||
|
|
||||||
def _copy(self):
|
def _copy(self):
|
||||||
logger.info("TODO: copy")
|
logger.info("TODO: copy")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue