Commit b5b338bcbe7e65dd744ac28f304a773ce7a92674
1 parent
6392b159
Exists in
master
and in
68 other branches
Change title to "InVesalius 3" in close project FIX: #121
Showing
2 changed files
with
11 additions
and
4 deletions
Show diff stats
invesalius/control.py
@@ -162,17 +162,20 @@ class Controller(): | @@ -162,17 +162,20 @@ class Controller(): | ||
162 | print "Close without changes" | 162 | print "Close without changes" |
163 | self.CloseProject() | 163 | self.CloseProject() |
164 | ps.Publisher().sendMessage("Enable state project", False) | 164 | ps.Publisher().sendMessage("Enable state project", False) |
165 | + ps.Publisher().sendMessage('Set project name') | ||
165 | elif answer == 1: | 166 | elif answer == 1: |
166 | self.ShowDialogSaveProject() | 167 | self.ShowDialogSaveProject() |
167 | print "Save changes and close" | 168 | print "Save changes and close" |
168 | self.CloseProject() | 169 | self.CloseProject() |
169 | ps.Publisher().sendMessage("Enable state project", False) | 170 | ps.Publisher().sendMessage("Enable state project", False) |
171 | + ps.Publisher().sendMessage('Set project name') | ||
170 | elif answer == -1: | 172 | elif answer == -1: |
171 | print "Cancel" | 173 | print "Cancel" |
172 | else: | 174 | else: |
173 | self.CloseProject() | 175 | self.CloseProject() |
174 | ps.Publisher().sendMessage("Enable state project", False) | 176 | ps.Publisher().sendMessage("Enable state project", False) |
175 | - | 177 | + ps.Publisher().sendMessage('Set project name') |
178 | + | ||
176 | ########################### | 179 | ########################### |
177 | def OnOpenProject(self, pubsub_evt): | 180 | def OnOpenProject(self, pubsub_evt): |
178 | path = pubsub_evt.data | 181 | path = pubsub_evt.data |
invesalius/gui/frame.py
@@ -99,10 +99,14 @@ class Frame(wx.Frame): | @@ -99,10 +99,14 @@ class Frame(wx.Frame): | ||
99 | 99 | ||
100 | def SetProjectName(self, pubsub_evt): | 100 | def SetProjectName(self, pubsub_evt): |
101 | proj_name = pubsub_evt.data | 101 | proj_name = pubsub_evt.data |
102 | - if sys.platform != 'darwin': | ||
103 | - self.SetTitle("%s - InVesalius 3"%(proj_name)) | 102 | + |
103 | + if not(proj_name): | ||
104 | + self.SetTitle("InVesalius 3") | ||
104 | else: | 105 | else: |
105 | - self.SetTitle("%s"%(proj_name)) | 106 | + if sys.platform != 'darwin': |
107 | + self.SetTitle("%s - InVesalius 3"%(proj_name)) | ||
108 | + else: | ||
109 | + self.SetTitle("%s"%(proj_name)) | ||
106 | 110 | ||
107 | def UpdateAui(self, pubsub_evt): | 111 | def UpdateAui(self, pubsub_evt): |
108 | self.aui_manager.Update() | 112 | self.aui_manager.Update() |