Changeset 2c60cb69 in sasview for fittingview


Ignore:
Timestamp:
Aug 26, 2011 5:51:38 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:
946b452
Parents:
4957b16
Message:

enabled smear even without data

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fittingview/src/sans/perspectives/fitting/fitpage.py

    r4957b16 r2c60cb69  
    484484        self.model_help.SetToolTipString("Model Function Help") 
    485485        id = wx.NewId() 
    486         self.model_view = wx.Button(self, id,"1D Mode", size=(80, 23)) 
     486        self.model_view = wx.Button(self, id,"Show 2D", size=(80, 23)) 
    487487        self.model_view.Bind(wx.EVT_BUTTON, self._onModel2D, id=id) 
    488488        hint = "toggle view of model from 1D to 2D  or 2D to 1D" 
     
    11141114            # Reset smearer, model and data 
    11151115            self._set_smear(self.data) 
     1116     
     1117            # more disables for 2D 
     1118            self._set_smear_buttons() 
     1119             
    11161120            try: 
    11171121                # update smearer sizer 
     
    29652969        toggle view of model from 1D to 2D  or 2D from 1D 
    29662970        """ 
    2967         if self.model_view.GetLabelText() == "1D Mode": 
    2968             self.model_view.SetLabel("2D Mode") 
     2971        if self.model_view.GetLabelText() == "Show 2D": 
     2972            self.model_view.SetLabel("Show 1D") 
    29692973            self.enable2D = True 
    29702974               
    29712975        else: 
    2972             self.model_view.SetLabel("1D Mode") 
     2976            self.model_view.SetLabel("Show 2D") 
    29732977            self.enable2D = False 
    29742978        self.create_default_data() 
    29752979        self.set_model_param_sizer(self.model) 
    29762980        self._set_sizer_dispersion()   
     2981        self._set_smear_buttons() 
    29772982        self._draw_model() 
    29782983         
    29792984         
    29802985        self.state.enable2D =  copy.deepcopy(self.enable2D) 
    2981          
     2986     
     2987    def _set_smear_buttons(self): 
     2988        """ 
     2989        Set semarer radio buttons  
     2990        """ 
     2991        # more disables for 2D 
     2992        if self.data.__class__.__name__ ==  "Data2D" or \ 
     2993                    self.enable2D: 
     2994            self.slit_smearer.Disable() 
     2995            self.pinhole_smearer.Enable(True)  
     2996            self.default_mask = copy.deepcopy(self.data.mask) 
     2997        else: 
     2998            self.slit_smearer.Enable(True)  
     2999            self.pinhole_smearer.Enable(True)   
     3000             
     3001             
    29823002class BGTextCtrl(wx.TextCtrl): 
    29833003    """ 
Note: See TracChangeset for help on using the changeset viewer.