Commit 51edd8828c07bdef7f149d5894ac040f4e6a8efd
1 parent
527eb7a1
Exists in
master
and in
68 other branches
FIX: Cancel button on save project dialog (fix #239)
Showing
2 changed files
with
6 additions
and
3 deletions
Show diff stats
invesalius/control.py
| ... | ... | @@ -170,6 +170,7 @@ class Controller(): |
| 170 | 170 | ps.Publisher().sendMessage("Enable state project", False) |
| 171 | 171 | ps.Publisher().sendMessage('Set project name') |
| 172 | 172 | ps.Publisher().sendMessage("Stop Config Recording") |
| 173 | + ps.Publisher().sendMessage("Exit") | |
| 173 | 174 | elif answer == 1: |
| 174 | 175 | self.ShowDialogSaveProject() |
| 175 | 176 | debug("Save changes and close") |
| ... | ... | @@ -177,7 +178,7 @@ class Controller(): |
| 177 | 178 | ps.Publisher().sendMessage("Enable state project", False) |
| 178 | 179 | ps.Publisher().sendMessage('Set project name') |
| 179 | 180 | ps.Publisher().sendMessage("Stop Config Recording") |
| 180 | - | |
| 181 | + ps.Publisher().sendMessage("Exit") | |
| 181 | 182 | elif answer == -1: |
| 182 | 183 | debug("Cancel") |
| 183 | 184 | else: |
| ... | ... | @@ -185,6 +186,7 @@ class Controller(): |
| 185 | 186 | ps.Publisher().sendMessage("Enable state project", False) |
| 186 | 187 | ps.Publisher().sendMessage('Set project name') |
| 187 | 188 | ps.Publisher().sendMessage("Stop Config Recording") |
| 189 | + ps.Publisher().sendMessage("Exit") | |
| 188 | 190 | |
| 189 | 191 | else: |
| 190 | 192 | ps.Publisher().sendMessage('Stop Config Recording') | ... | ... |
invesalius/gui/frame.py
| ... | ... | @@ -93,6 +93,7 @@ class Frame(wx.Frame): |
| 93 | 93 | sub(self._ShowImportPanel, 'Show import panel in frame') |
| 94 | 94 | sub(self._ShowTask, 'Show task panel') |
| 95 | 95 | sub(self._UpdateAUI, 'Update AUI') |
| 96 | + sub(self._Exit, 'Exit') | |
| 96 | 97 | |
| 97 | 98 | def __bind_events_wx(self): |
| 98 | 99 | """ |
| ... | ... | @@ -194,7 +195,7 @@ class Frame(wx.Frame): |
| 194 | 195 | #no matching wxBeginBusyCursor() for wxEndBusyCursor() |
| 195 | 196 | pass |
| 196 | 197 | |
| 197 | - def _Exit(self): | |
| 198 | + def _Exit(self, pubsub_evt): | |
| 198 | 199 | """ |
| 199 | 200 | Exit InVesalius. |
| 200 | 201 | """ |
| ... | ... | @@ -281,7 +282,7 @@ class Frame(wx.Frame): |
| 281 | 282 | Close all project data. |
| 282 | 283 | """ |
| 283 | 284 | ps.Publisher().sendMessage('Close Project') |
| 284 | - self._Exit() | |
| 285 | + #/self._Exit() | |
| 285 | 286 | |
| 286 | 287 | def OnMenuClick(self, evt): |
| 287 | 288 | """ | ... | ... |