Changeset a97aebd in sasview for src/sas


Ignore:
Timestamp:
Mar 2, 2017 3:44:58 PM (8 years ago)
Author:
Paul Kienzle <pkienzle@…>
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, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
66aeb15
Parents:
8fa3fb8 (diff), 951701c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' into expandable-de-688

Location:
src/sas/sasgui
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/perspectives/fitting/fitpage.py

    ref2cdb3 r8c0d9eb  
    164164        On_select_data 
    165165        """ 
    166         if event is None and self.dataSource.GetCount() > 0: 
    167             data = self.dataSource.GetClientData(0) 
    168             self.set_data(data) 
    169         elif self.dataSource.GetCount() > 0: 
    170             pos = self.dataSource.GetSelection() 
     166        if self.dataSource.GetCount() > 0: 
     167            pos = self.dataSource.GetSelection() if event is not None else 0 
    171168            data = self.dataSource.GetClientData(pos) 
    172169            self.set_data(data) 
     
    256253        self.Bind(wx.EVT_RADIOBUTTON, self.onWeighting, 
    257254                  id=self.dI_idata.GetId()) 
    258         self.dI_didata.SetValue(True) 
     255        self.dI_noweight.SetValue(True) 
    259256        # add 4 types of weighting to the sizer 
    260257        sizer_weighting.Add(self.dI_noweight, 0, wx.LEFT, 10) 
     
    266263        sizer_weighting.Add(self.dI_idata) 
    267264        sizer_weighting.Add((10, 10)) 
    268         self.dI_noweight.Enable(False) 
     265        self.dI_noweight.Enable(True) 
    269266        self.dI_didata.Enable(False) 
    270267        self.dI_sqrdata.Enable(False) 
     
    12711268            if copy_flag: 
    12721269                self.get_paste_params(copy_flag) 
    1273                 wx.CallAfter(self._onDraw, None) 
     1270            wx.CallAfter(self._onDraw, None) 
    12741271 
    12751272        else: 
     
    16271624        elif data.dxl is not None or data.dxw is not None: 
    16281625            self.smear_type = "Slit" 
    1629             if data.dxl is not None and not numpy.all(data.dxl, 0): 
     1626            if data.dxl is not None and numpy.all(data.dxl, 0): 
    16301627                self.dq_l = data.dxl[0] 
    1631             if data.dxw is not None and not numpy.all(data.dxw, 0): 
     1628            if data.dxw is not None and numpy.all(data.dxw, 0): 
    16321629                self.dq_r = data.dxw[0] 
    16331630        # return self.smear_type,self.dq_l,self.dq_r 
     
    20162013            self.EditMask_title.Disable() 
    20172014 
    2018         self.onSmear(event=None) 
     2015        self.on_smear_helper() 
    20192016        self.on_set_focus(None) 
    20202017        self.Refresh() 
  • src/sas/sasgui/perspectives/fitting/model_thread.py

    rc1681ea rc1c9929  
    177177            unsmeared_output = numpy.zeros((len(self.data.x))) 
    178178            unsmeared_output[first_bin:last_bin+1] = self.model.evalDistribution(mask) 
     179            self.smearer.model = self.model 
    179180            output = self.smearer(unsmeared_output, first_bin, last_bin) 
    180181 
  • src/sas/sasgui/guiframe/data_panel.py

    rc8e1996 rcb1e9a5  
    520520        Add a listcrtl in the panel 
    521521        """ 
    522         tree_ctrl_label = wx.StaticText(self, -1, "Data") 
    523         tree_ctrl_label.SetForegroundColour('blue') 
    524         self.tree_ctrl = DataTreeCtrl(parent=self, style=wx.SUNKEN_BORDER) 
     522        # Add splitter 
     523        w, h = self.parent.GetSize() 
     524        splitter = wx.SplitterWindow(self) 
     525        splitter.SetMinimumPaneSize(50) 
     526        splitter.SetSashGravity(1.0) 
     527 
     528        file_sizer = wx.BoxSizer(wx.VERTICAL) 
     529        file_sizer.SetMinSize(wx.Size(w/13, h*2/5)) 
     530        theory_sizer = wx.BoxSizer(wx.VERTICAL) 
     531        theory_sizer.SetMinSize(wx.Size(w/13, h*2/5)) 
     532 
     533        self.tree_ctrl = DataTreeCtrl(parent=splitter, style=wx.SUNKEN_BORDER) 
     534 
    525535        self.tree_ctrl.Bind(CT.EVT_TREE_ITEM_CHECKING, self.on_check_item) 
    526536        self.tree_ctrl.Bind(CT.EVT_TREE_ITEM_MENU, self.on_right_click_data) 
     
    557567        wx.EVT_MENU(self, self.editmask_id, self.on_edit_data) 
    558568 
    559         tree_ctrl_theory_label = wx.StaticText(self, -1, "Theory") 
    560         tree_ctrl_theory_label.SetForegroundColour('blue') 
    561         self.tree_ctrl_theory = DataTreeCtrl(parent=self, 
     569        self.tree_ctrl_theory = DataTreeCtrl(parent=splitter, 
    562570                                             style=wx.SUNKEN_BORDER) 
    563571        self.tree_ctrl_theory.Bind(CT.EVT_TREE_ITEM_CHECKING, 
     
    565573        self.tree_ctrl_theory.Bind(CT.EVT_TREE_ITEM_MENU, 
    566574                                   self.on_right_click_theory) 
    567         self.sizer1.Add(tree_ctrl_label, 0, wx.LEFT, 10) 
    568         self.sizer1.Add(self.tree_ctrl, 1, wx.EXPAND | wx.ALL, 10) 
    569         self.sizer1.Add(tree_ctrl_theory_label, 0,  wx.LEFT, 10) 
    570         self.sizer1.Add(self.tree_ctrl_theory, 1, wx.EXPAND | wx.ALL, 10) 
     575        self.tree_ctrl.InsertItem(self.tree_ctrl.root, -1, " Data") 
     576        self.tree_ctrl_theory.InsertItem(self.tree_ctrl_theory.root, 
     577                                         -1, " Theory") 
     578        splitter.SplitHorizontally(self.tree_ctrl, self.tree_ctrl_theory) 
     579        self.sizer1.Add(splitter, 1, wx.EXPAND | wx.ALL, 10) 
    571580 
    572581    def on_right_click_theory(self, event): 
Note: See TracChangeset for help on using the changeset viewer.