Changeset e2f0554 in sasview for sansview/perspectives/fitting


Ignore:
Timestamp:
Mar 10, 2011 9:49:15 AM (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:
fa65e99
Parents:
cab8143
Message:

working on swithcing from 1d to 2d theory

File:
1 edited

Legend:

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

    r8b6f489 re2f0554  
    467467        self.minimum_q = BGTextCtrl(self, -1, size=(_BOX_WIDTH,20)) 
    468468        self.minimum_q.SetValue(str(data_min)) 
    469         #self.minimum_q.SetEditable(False) 
    470469        self.maximum_q = BGTextCtrl(self, -1,size=(_BOX_WIDTH,20)) 
    471470        self.maximum_q.SetValue(str(data_max)) 
    472         #self.maximum_q.SetEditable(False) 
    473471        sizer_range.Add(wx.StaticText(self, -1, "Min: "),0, wx.LEFT, 10) 
    474472        sizer_range.Add(self.minimum_q,0, wx.LEFT, 10) 
     
    476474        sizer_range.Add(self.maximum_q,0, wx.LEFT, 10) 
    477475        id = wx.NewId() 
    478         self.model_view = wx.Button(self, id,'View 2D', size=(80, 23)) 
     476        self.model_view = wx.Button(self, id,"Switch to 2D", size=(80, 23)) 
    479477        self.model_view.Bind(wx.EVT_BUTTON, self._onModel2D, id=id) 
    480478        hint = "toggle view of model from 1D to 2D  or 2D from 1D" 
     
    14741472                self.default_mask = copy.deepcopy(self.data.mask) 
    14751473                 
     1474                 
    14761475            self.formfactorbox.Enable() 
    14771476            self.structurebox.Enable() 
     
    14901489                self.EditMask_title.Disable() 
    14911490            else: 
     1491                 
    14921492                ## Minimum value of data  
    14931493                data_min = 0 
     
    15141514        self.state.qmin = self.qmin_x 
    15151515        self.state.qmax = self.qmax_x 
     1516        
    15161517        #update model plot with new data information 
    15171518        if flag: 
     1519            #set model view button 
     1520            if self.data.__class__.__name__ == "Data2D": 
     1521                self.enable2D = True 
     1522                self.model_view.SetLabel("2D Mode") 
     1523            else: 
     1524                self.enable2D = False 
     1525                self.model_view.SetLabel("1D Mode") 
     1526            self.model_view.Disable() 
    15181527            self._draw_model() 
    15191528         
     
    26262635        toggle view of model from 1D to 2D  or 2D from 1D 
    26272636        """ 
    2628         if self.model_view.GetLabelText() == "View 2D": 
    2629             self.model_view.SetLabel("View 1D") 
     2637        if self.model_view.GetLabelText() == "Switch to 2D": 
     2638            self.model_view.SetLabel("Switch to 1D") 
    26302639            self.enable2D = True 
    26312640        else: 
    2632             self.model_view.SetLabel("View 2D") 
     2641            self.model_view.SetLabel("Switch to 2D") 
    26332642            self.enable2D = False 
    26342643        self._draw_model() 
Note: See TracChangeset for help on using the changeset viewer.