Changeset 50c769e in sasview for sansview/perspectives/fitting


Ignore:
Timestamp:
Feb 19, 2009 3:13:27 PM (16 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:
77bf7c0
Parents:
4f8a00c
Message:

add model description back on modelpage

File:
1 edited

Legend:

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

    r96f97f3 r50c769e  
    4848        #panel interface 
    4949        self.vbox  = wx.BoxSizer(wx.VERTICAL) 
     50        self.sizer11 = wx.BoxSizer(wx.HORIZONTAL) 
    5051        self.sizer10 = wx.GridBagSizer(5,5) 
    5152        self.sizer9 = wx.GridBagSizer(5,5) 
     
    5960        self.vbox.Add(wx.StaticLine(self, -1), 0, wx.EXPAND, 0) 
    6061        self.vbox.Add(self.sizer4) 
     62        #model description 
     63        self.vbox.Add(self.sizer11) 
    6164        #model paramaters layer 
    6265        self.vbox.Add(self.sizer5) 
     
    7780       
    7881        #------------------ sizer 4  draw------------------------   
    79         # model on which the fit would be performed 
    80         self.model=model  
     82        
    8183        
    8284        # define combox box 
     
    100102        self.model_view.Bind(wx.EVT_BUTTON, self.onModel2D,id=id) 
    101103        self.model_view.SetToolTipString("View model in 2D") 
     104         
    102105        self.sizer4.Add(self.model_view,(iy,ix),(1,1),\ 
    103106                   wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15) 
     107         
    104108        self.model_view.Enable() 
    105109        self.model_view.SetFocus() 
    106110         
     111        ix = 0 
     112        iy += 1 
     113        self.sizer4.Add((20,20),(iy,ix),(1,1),wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15) 
     114 
    107115        #----------sizer6------------------------------------------------- 
    108116        self.disable_disp = wx.RadioButton(self, -1, 'No', (10, 10), style=wx.RB_GROUP) 
     
    203211        self.model_list_box={} 
    204212        #Draw initial panel 
     213         #-----sizer 11--------------------model description------ 
    205214        if self.model!=None: 
    206215            self.set_panel(self.model) 
     
    216225        self.Layout() 
    217226        self.parent.GetSizer().Layout() 
     227    def set_model_description(self, model): 
     228         
     229        if model !=None and str(model.description)!=""and self.data==None: 
     230            self.sizer11.Clear(True) 
     231            self.box_description= wx.StaticBox(self, -1, 'Model Description') 
     232            boxsizer1 = wx.StaticBoxSizer(self.box_description, wx.VERTICAL) 
     233            boxsizer1.SetMinSize((320,20)) 
     234            self.description = wx.StaticText(self,-1,str(model.description)) 
     235            boxsizer1.Add(self.description, 0, wx.EXPAND)   
     236            self.sizer11.Add(boxsizer1,1, wx.EXPAND | wx.ALL, 2) 
     237       
    218238         
    219239    def set_owner(self,owner): 
     
    471491        self.fixed_param=[] 
    472492        self.model = model 
     493         
     494        self.set_model_description( self.model)  
     495         
    473496        keys = self.model.getParamList() 
    474497        #list of dispersion paramaters 
Note: See TracChangeset for help on using the changeset viewer.