mirror of https://gitlab.com/pamhyr/pamhyr2
Scenario: Add some save dialog.
parent
5d8ec51417
commit
190ca5d171
|
|
@ -470,9 +470,16 @@ class GraphWidget(QGraphicsView):
|
|||
self.changeScenario.emit(self.sender())
|
||||
|
||||
def new_scenario(self, pos):
|
||||
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(
|
||||
AddScenariosCommand(
|
||||
self._study,
|
||||
|
|
@ -500,9 +507,16 @@ class GraphWidget(QGraphicsView):
|
|||
self.changeScenario.emit(self.sender())
|
||||
|
||||
def duplicate_scenario(self, item):
|
||||
must_save = self.dialog_save()
|
||||
if must_save == "Cancel":
|
||||
return
|
||||
|
||||
def fn():
|
||||
self._close_other_window()
|
||||
# self._study.save()
|
||||
|
||||
if must_save == "Save":
|
||||
self._study.save()
|
||||
|
||||
self._undo.push(
|
||||
DuplicateScenariosCommand(
|
||||
self._study,
|
||||
|
|
|
|||
Loading…
Reference in New Issue