Changeset 2498b9c in sasview


Ignore:
Timestamp:
Apr 3, 2014 11:57:32 AM (11 years ago)
Author:
Mathieu Doucet <doucetm@…>
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
23f4571
Parents:
2f2d9d0
Message:

Fix issue with wx3.0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sans/guiframe/gui_manager.py

    rcaf273b r2498b9c  
    12391239        add toolbar to the frame 
    12401240        """ 
    1241         # Set toolbar 
    12421241        self._toolbar = GUIToolBar(self) 
    1243         sizer = wx.BoxSizer(wx.VERTICAL) 
    1244         sizer.Add(self._toolbar, 0, wx.EXPAND) 
    1245         self.SetSizer(sizer) 
     1242        # The legacy code doesn't work well for wx 3.0 
     1243        # but the old code produces better results with wx 2.8 
     1244        if wx.VERSION_STRING >= '3.0.0.0': 
     1245            sizer = wx.BoxSizer(wx.VERTICAL) 
     1246            sizer.Add(self._toolbar, 0, wx.EXPAND) 
     1247            self.SetSizer(sizer) 
     1248        else: 
     1249            self.SetToolBar(self._toolbar) 
    12461250        self._update_toolbar_helper() 
    12471251        self._on_toggle_toolbar(event=None) 
Note: See TracChangeset for help on using the changeset viewer.