Changeset ead78a4 in sasview for guiframe/local_perspectives


Ignore:
Timestamp:
Jun 16, 2011 1:41:14 PM (13 years ago)
Author:
Jae Cho <jhjcho@…>
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:
9e87b76
Parents:
60063f3
Message:

more fix in graph menu

File:
1 edited

Legend:

Unmodified
Added
Removed
  • guiframe/local_perspectives/plotting/plotting.py

    r60063f3 read78a4  
    329329        id = panel.uid 
    330330        if event.GetShow() and self.parent._mgr.GetPane(panel).IsShown(): 
    331             if not self.menu.IsChecked(id): 
    332                 self.menu.Check(id, True) 
    333                 #self.menu.Enable(id, False) 
     331            try: 
     332                if self.menu.FindItemById(id) != None: 
     333                    if not self.menu.IsChecked(id): 
     334                        self.menu.Check(id, True) 
     335                        #self.menu.Enable(id, False) 
     336            except: 
     337                # when no such item; may happens after delete 
     338                pass 
    334339        else: 
    335340            try: 
    336                 if self.menu.IsChecked(id): 
    337                     self.menu.Check(id, False) 
    338                     #self.menu.Enable(id, True) 
     341                if self.menu.FindItemById(id) != None: 
     342                    if self.menu.IsChecked(id): 
     343                        self.menu.Check(id, False) 
     344                        #self.menu.Enable(id, True) 
    339345            except: 
    340346                pass  
Note: See TracChangeset for help on using the changeset viewer.