Commit 888c6cb4 authored by eric pellegrini's avatar eric pellegrini

Bug fix when toggle on/off the toolbar

Removed modal status of elements database editor
parent 4be5cd24
...@@ -235,9 +235,7 @@ class ElementsDatabaseEditor(wx.Frame): ...@@ -235,9 +235,7 @@ class ElementsDatabaseEditor(wx.Frame):
self.Bind(wx.EVT_MENU,self.on_saveas_database, saveasItem) self.Bind(wx.EVT_MENU,self.on_saveas_database, saveasItem)
self.SetMenuBar(menubar) self.SetMenuBar(menubar)
def on_show_popup_menu(self, event): def on_show_popup_menu(self, event):
menu = wx.Menu() menu = wx.Menu()
...@@ -409,13 +409,19 @@ or directly to the MDANSE mailing list: ...@@ -409,13 +409,19 @@ or directly to the MDANSE mailing list:
def on_toggle_toolbar(self, event=None): def on_toggle_toolbar(self, event=None):
self._prevSize = self.GetSize()
if self.GetToolBar(): if self.GetToolBar():
sizeH = self._prevSize[1] - self._toolbar.GetSize()[1]
self._toolbar.Hide() self._toolbar.Hide()
self.SetToolBar(None) self.SetToolBar(None)
else: else:
sizeH = self._prevSize[1] + self._toolbar.GetSize()[1]
self.SetToolBar(self._toolbar) self.SetToolBar(self._toolbar)
self._toolbar.Show() self._toolbar.Show()
@property @property
def panels(self): def panels(self):
return self._panels return self._panels
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment