mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
Scenario: Add duplicate command.
This commit is contained in:
1 parent
0608b9175e
commit
9043b6e2a3
4 files changed
+47
-3
No files matched your search
@@ -459,6 +459,19 @@ class GraphWidget(QGraphicsView):
|
||||
self.exec_with_waiting_window(fn, "delete_scenario")
|
||||
self.changeScenario.emit(self.sender())
|
||||
|
||||
def duplicate_scenario(self, item):
|
||||
def fn():
|
||||
self._close_other_window()
|
||||
# self._study.save()
|
||||
self._undo.push(
|
||||
DuplicateScenariosCommand(
|
||||
self._study,
|
||||
)
|
||||
)
|
||||
|
||||
self.exec_with_waiting_window(fn, "duplicate_scenario")
|
||||
self.changeScenario.emit(self.sender())
|
||||
|
||||
def _close_other_window(self):
|
||||
self.parent\
|
||||
.parent\
|
||||
|
||||
Reference in new issue
Block a user