Ignore:
Timestamp:
Oct 21, 2009 3:46:36 PM (15 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:
40d4b09
Parents:
81bece4
Message:

fixed bugs for mac: 1)crashing when changing param values, 2)textctrl was not receiving enter-key on set-value of q range.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sansview/perspectives/fitting/basepage.py

    r156a0b2 racd0bda3  
    944944            is_modified =self._check_value_enter( self.fittable_param ,is_modified) 
    945945            is_modified =self._check_value_enter( self.fixed_param ,is_modified) 
    946             is_modified =self._check_value_enter( self.parameters ,is_modified)         
    947              
    948             self.sizer3.Layout() 
    949             self.Layout() 
    950             self.Refresh() 
     946            is_modified =self._check_value_enter( self.parameters ,is_modified)  
     947                    
     948            if is_modified: 
     949                self.sizer3.Layout() 
     950                self.Layout() 
     951                self.Refresh() 
    951952            # Here we should check whether the boundaries have been modified. 
    952953            # If qmin and qmax have been modified, update qmin and qmax and  
     
    979980                self.save_current_state() 
    980981                 
    981                  
     982            self._is_modified(is_modified = is_modified)  
     983                
     984    def _is_modified(self, is_modified = False): 
     985        """ 
     986            return to self._is_modified 
     987        """ 
     988        self.is_modified = is_modified 
     989        return self.is_modified 
     990                        
    982991    def _reset_parameters_state(self, listtorestore,statelist): 
    983992        """ 
     
    12181227        ##For MAC, this should defined here. 
    12191228        if box_sizer == None: 
    1220                 box_description= wx.StaticBox(self, -1,str(title)) 
    1221                 boxsizer1 = wx.StaticBoxSizer(box_description, wx.VERTICAL) 
     1229            box_description= wx.StaticBox(self, -1,str(title)) 
     1230            boxsizer1 = wx.StaticBoxSizer(box_description, wx.VERTICAL) 
    12221231        else: 
    12231232            boxsizer1 = box_sizer 
     
    17661775        #-------------------------------------------------------------- 
    17671776        if box_sizer == None: 
    1768                 box_description= wx.StaticBox(self, -1,str(title)) 
    1769                 boxsizer1 = wx.StaticBoxSizer(box_description, wx.VERTICAL) 
     1777            box_description= wx.StaticBox(self, -1,str(title)) 
     1778            boxsizer1 = wx.StaticBoxSizer(box_description, wx.VERTICAL) 
    17701779        else: 
    17711780            #for MAC 
    17721781            boxsizer1 = box_sizer 
    17731782 
    1774         self.qmin    = BasicPage.ModelTextCtrl(self, -1,size=(_BOX_WIDTH,20)) 
     1783        self.qmin    = BasicPage.ModelTextCtrl(self, -1,size=(_BOX_WIDTH,20),style=wx.TE_PROCESS_ENTER) 
    17751784        self.qmin.SetValue(str(self.qmin_x)) 
    17761785        self.qmin.SetToolTipString("Minimun value of Q in linear scale.") 
     
    17791788        #self.qmin.Bind(wx.EVT_TEXT_ENTER, self._onparamEnter) 
    17801789      
    1781         self.qmax    = BasicPage.ModelTextCtrl(self, -1,size=(_BOX_WIDTH,20)) 
     1790        self.qmax    = BasicPage.ModelTextCtrl(self, -1,size=(_BOX_WIDTH,20),style=wx.TE_PROCESS_ENTER) 
    17821791        self.qmax.SetValue(str(self.qmax_x)) 
    17831792        self.qmax.SetToolTipString("Maximum value of Q in linear scale.") 
Note: See TracChangeset for help on using the changeset viewer.