Commit dba9e5a4ddd8496d057d5211a7afd0deed07ee51

Authored by tatiana
1 parent a95df161

FIX: Close project/ Exit InVesalius under darwin (needs testing)

invesalius/control.py
... ... @@ -169,7 +169,6 @@ class Controller():
169 169 ps.Publisher().sendMessage("Enable state project", False)
170 170 ps.Publisher().sendMessage('Set project name')
171 171 ps.Publisher().sendMessage("Stop Config Recording")
172   - ps.Publisher().sendMessage('Close Window')
173 172 elif answer == 1:
174 173 self.ShowDialogSaveProject()
175 174 debug("Save changes and close")
... ... @@ -177,7 +176,6 @@ class Controller():
177 176 ps.Publisher().sendMessage("Enable state project", False)
178 177 ps.Publisher().sendMessage('Set project name')
179 178 ps.Publisher().sendMessage("Stop Config Recording")
180   - ps.Publisher().sendMessage('Close Window')
181 179  
182 180 elif answer == -1:
183 181 debug("Cancel")
... ... @@ -186,11 +184,9 @@ class Controller():
186 184 ps.Publisher().sendMessage("Enable state project", False)
187 185 ps.Publisher().sendMessage('Set project name')
188 186 ps.Publisher().sendMessage("Stop Config Recording")
189   - ps.Publisher().sendMessage('Close Window')
190 187  
191 188 else:
192 189 ps.Publisher().sendMessage('Stop Config Recording')
193   - ps.Publisher().sendMessage('Close Window')
194 190  
195 191  
196 192 ###########################
... ...
invesalius/gui/frame.py
... ... @@ -78,7 +78,6 @@ class Frame(wx.Frame):
78 78 sub = ps.Publisher().subscribe
79 79 sub(self._BeginBusyCursor, 'Begin busy cursor')
80 80 sub(self._ShowContentPanel, 'Cancel DICOM load')
81   - sub(self._Exit, 'Close Window')
82 81 sub(self._EndBusyCursor, 'End busy cursor')
83 82 sub(self._HideContentPanel, 'Hide content panel')
84 83 sub(self._HideImportPanel, 'Hide import panel')
... ... @@ -189,7 +188,7 @@ class Frame(wx.Frame):
189 188 #no matching wxBeginBusyCursor() for wxEndBusyCursor()
190 189 pass
191 190  
192   - def _Exit(self, pubsub_evt):
  191 + def _Exit(self):
193 192 """
194 193 Exit InVesalius.
195 194 """
... ... @@ -276,6 +275,7 @@ class Frame(wx.Frame):
276 275 Close all project data.
277 276 """
278 277 ps.Publisher().sendMessage('Close Project')
  278 + self._Exit()
279 279  
280 280 def OnMenuClick(self, evt):
281 281 """
... ...