mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
Ensemble: Create new ensemble scenario.
This commit is contained in:
1 parent
70dae9ab1b
commit
e64c45b621
8 files changed
+105
-14
No files matched your search
@@ -526,6 +526,26 @@ class GraphWidget(QGraphicsView):
|
||||
self.exec_with_waiting_window(fn, "duplicate_scenario")
|
||||
self.changeScenario.emit(self.sender())
|
||||
|
||||
def create_ensemble_scenario(self, item):
|
||||
must_save = self.dialog_save()
|
||||
if must_save == "Cancel":
|
||||
return
|
||||
|
||||
def fn():
|
||||
self._close_other_window()
|
||||
|
||||
if must_save == "Save":
|
||||
self._study.save()
|
||||
|
||||
self._undo.push(
|
||||
CreateEnsembleScenarioCommand(
|
||||
self._study,
|
||||
)
|
||||
)
|
||||
|
||||
self.exec_with_waiting_window(fn, "create_ensemble_scenario")
|
||||
self.changeScenario.emit(self.sender())
|
||||
|
||||
def _close_other_window(self):
|
||||
self.parent\
|
||||
.parent\
|
||||
|
||||
Reference in new issue
Block a user