From dba9e5a4ddd8496d057d5211a7afd0deed07ee51 Mon Sep 17 00:00:00 2001 From: tatiana Date: Thu, 18 Feb 2010 11:47:48 +0000 Subject: [PATCH] FIX: Close project/ Exit InVesalius under darwin (needs testing) --- invesalius/control.py | 4 ---- invesalius/gui/frame.py | 4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/invesalius/control.py b/invesalius/control.py index 3598e03..547c412 100755 --- a/invesalius/control.py +++ b/invesalius/control.py @@ -169,7 +169,6 @@ class Controller(): ps.Publisher().sendMessage("Enable state project", False) ps.Publisher().sendMessage('Set project name') ps.Publisher().sendMessage("Stop Config Recording") - ps.Publisher().sendMessage('Close Window') elif answer == 1: self.ShowDialogSaveProject() debug("Save changes and close") @@ -177,7 +176,6 @@ class Controller(): ps.Publisher().sendMessage("Enable state project", False) ps.Publisher().sendMessage('Set project name') ps.Publisher().sendMessage("Stop Config Recording") - ps.Publisher().sendMessage('Close Window') elif answer == -1: debug("Cancel") @@ -186,11 +184,9 @@ class Controller(): ps.Publisher().sendMessage("Enable state project", False) ps.Publisher().sendMessage('Set project name') ps.Publisher().sendMessage("Stop Config Recording") - ps.Publisher().sendMessage('Close Window') else: ps.Publisher().sendMessage('Stop Config Recording') - ps.Publisher().sendMessage('Close Window') ########################### diff --git a/invesalius/gui/frame.py b/invesalius/gui/frame.py index 92b57a8..994768a 100755 --- a/invesalius/gui/frame.py +++ b/invesalius/gui/frame.py @@ -78,7 +78,6 @@ class Frame(wx.Frame): sub = ps.Publisher().subscribe sub(self._BeginBusyCursor, 'Begin busy cursor') sub(self._ShowContentPanel, 'Cancel DICOM load') - sub(self._Exit, 'Close Window') sub(self._EndBusyCursor, 'End busy cursor') sub(self._HideContentPanel, 'Hide content panel') sub(self._HideImportPanel, 'Hide import panel') @@ -189,7 +188,7 @@ class Frame(wx.Frame): #no matching wxBeginBusyCursor() for wxEndBusyCursor() pass - def _Exit(self, pubsub_evt): + def _Exit(self): """ Exit InVesalius. """ @@ -276,6 +275,7 @@ class Frame(wx.Frame): Close all project data. """ ps.Publisher().sendMessage('Close Project') + self._Exit() def OnMenuClick(self, evt): """ -- libgit2 0.21.2