Changeset 66718a1 in sasview


Ignore:
Timestamp:
Jun 19, 2011 1:06:24 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:
71fa9bb9
Parents:
b770c3d
Message:

With wx ≥2.9.3, wx is sending resizing event, solution is manullay checking if the size is changed

File:
1 edited

Legend:

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

    r4754192 r66718a1  
    7272        ## Unique ID (from gui_manager) 
    7373        self.uid = None 
    74         
     74        self.x_size = None 
    7575        ## Default locations 
    7676        self._default_save_location = os.getcwd()  
     
    140140        On response of the resize of a panel, set axes_visiable False 
    141141        """ 
    142         # ready for another event 
    143         event.Skip()   
     142        # Ready for another event 
     143        # Do not remove this Skip. Otherwise it will get runtime error. 
     144        event.Skip()  
     145          
     146        # It was found that wx >= 2.9.3 sends an event even if no size changed. 
     147        # So manually recode the size (=x_size) and compare here. 
     148        if self.x_size != None: 
     149            if self.x_size == self.GetSize(): 
     150                return 
     151        self.x_size = self.GetSize() 
     152         
    144153        # set the resizing flag 
    145154        self.resizing = True 
Note: See TracChangeset for help on using the changeset viewer.