Changeset 4d7e5d5 in sasview for src/sans


Ignore:
Timestamp:
Apr 5, 2014 6:03:12 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:
da6c9847
Parents:
49d019c
Message:

refactor silly if statements

File:
1 edited

Legend:

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

    r49d019c r4d7e5d5  
    10111011        d_panel_width, h = self._get_panels_size(self._data_panel) 
    10121012        win.SetSize((d_panel_width, h)) 
    1013         style = self.__gui_style & GUIFRAME.MANAGER_ON 
    1014         if style != GUIFRAME.MANAGER_ON: 
    1015             flag = False 
    1016         else: 
    1017             flag = True 
     1013        is_visible = self.__gui_style & GUIFRAME.MANAGER_ON == GUIFRAME.MANAGER_ON 
    10181014        if not IS_WIN: 
    10191015            win.SetPosition((0, mac_pos_y + size_t_bar)) 
    1020         win.Show(flag) 
     1016        win.Show(is_visible) 
    10211017        # Add the panels to the AUI manager 
    10221018        for panel_class in panels: 
    10231019            frame = panel_class.get_frame() 
    10241020            id = wx.NewId() 
    1025             # Check whether we need to put this panel 
    1026             # in the center pane 
    1027              
     1021            # Check whether we need to put this panel in the center pane 
    10281022            if hasattr(panel_class, "CENTER_PANE") and panel_class.CENTER_PANE: 
    10291023                w, h = self._get_panels_size(panel_class) 
     
    10351029                    frame.Show(False) 
    10361030            elif panel_class == self._data_panel: 
    1037                 panel_class.frame.Show(flag) 
     1031                panel_class.frame.Show(is_visible) 
    10381032                continue 
    10391033            else: 
     
    10421036                frame.Show(False) 
    10431037            if not IS_WIN: 
    1044                 x_pos, _ = frame.GetPositionTuple() 
    10451038                frame.SetPosition((d_panel_width + 1, mac_pos_y + size_t_bar)) 
    10461039 
Note: See TracChangeset for help on using the changeset viewer.