Changeset e030625 in sasview for sansview/perspectives/fitting


Ignore:
Timestamp:
Mar 31, 2011 8:01:41 PM (14 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:
b0e8beb
Parents:
3450e7f
Message:

working fitpage inheritance

Location:
sansview/perspectives/fitting
Files:
2 edited

Legend:

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

    r2296316 re030625  
    4949        """ 
    5050        ScrolledPanel.__init__(self, parent, **kwargs) 
    51         PanelBase.__init__(self) 
     51        PanelBase.__init__(self, parent) 
    5252        self.SetupScrolling() 
    5353        #Set window's font size  
  • sansview/perspectives/fitting/fitpage.py

    r2296316 re030625  
    2323from basepage import PageInfoEvent 
    2424from sans.models.qsmearing import smear_selection 
     25 
    2526 
    2627class FitPage(BasicPage): 
     
    3839        """ 
    3940        BasicPage.__init__(self, parent, color=color) 
    40         
     41         
    4142        ## draw sizer 
    4243        self._fill_datainfo_sizer() 
     
    141142        #Fit button 
    142143        self.btFit = wx.Button(self,wx.NewId(),'Fit', size=(88,25)) 
    143         self.default_bt_colour = self.btFit.GetBackgroundColour() 
     144        self.default_bt_colour =  self.btFit.GetDefaultAttributes() 
    144145        self.btFit.Bind(wx.EVT_BUTTON, self._onFit,id= self.btFit.GetId()) 
    145146        self.btFit.SetToolTipString("Start fitting.") 
     
    969970                             id=self.btFit.GetId()) 
    970971        elif self.btFit.GetLabel().lower() == "fit": 
    971             self.btFit.SetBackgroundColour(self.default_bt_colour) 
     972            self.btFit.SetDefault() 
     973            #self.btFit.SetBackgroundColour(self.default_bt_colour) 
    972974            self.btFit.Bind(event=wx.EVT_BUTTON, handler=self._onFit,  
    973975                            id=self.btFit.GetId()) 
     
    10471049                self._draw_model() 
    10481050        if event != None: 
    1049              
    10501051            ## post state to fit panel 
    1051             event = PageInfoEvent(page = self) 
    1052             wx.PostEvent(self.parent, event)  
     1052            new_event = PageInfoEvent(page = self) 
     1053            wx.PostEvent(self.parent, new_event)  
    10531054            #update list of plugins if new plugin is available 
    10541055            if self.plugin_rbutton.GetValue(): 
Note: See TracChangeset for help on using the changeset viewer.