Changeset 629e8b9 in sasview


Ignore:
Timestamp:
Feb 2, 2010 12:48:23 PM (15 years ago)
Author:
Gervaise Alina <gervyh@…>
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:
1610976
Parents:
9455d77
Message:

add a check for default panel existence

File:
1 edited

Legend:

Unmodified
Added
Removed
  • guiframe/gui_manager.py

    rc1469ebe r629e8b9  
    548548        helpmenu = wx.Menu() 
    549549        # add the welcome panel menu item 
    550         id = wx.NewId() 
    551         helpmenu.Append(id,'&Welcome', '') 
    552         helpmenu.AppendSeparator() 
    553         wx.EVT_MENU(self, id, self.show_welcome_panel) 
     550        if self.defaultPanel is not None: 
     551            id = wx.NewId() 
     552            helpmenu.Append(id,'&Welcome', '') 
     553            helpmenu.AppendSeparator() 
     554            wx.EVT_MENU(self, id, self.show_welcome_panel) 
    554555         
    555556        # Look for help item in plug-ins  
     
    612613            Close the welcome panel 
    613614        """ 
     615        if self.defaultPanel is None: 
     616            return  
    614617        self._mgr.GetPane(self.panels["default"].window_name).Hide() 
    615618        self._mgr.Update() 
     
    620623            Display the welcome panel 
    621624        """ 
     625        if self.defaultPanel is None: 
     626            return  
    622627        for id in self.panels.keys(): 
    623628            if self._mgr.GetPane(self.panels[id].window_name).IsShown(): 
Note: See TracChangeset for help on using the changeset viewer.