Changeset a97aebd in sasview
- Timestamp:
- Mar 2, 2017 3:44:58 PM (8 years ago)
- 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. - Location:
- src/sas/sasgui
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/fitting/fitpage.py
ref2cdb3 r8c0d9eb 164 164 On_select_data 165 165 """ 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 171 168 data = self.dataSource.GetClientData(pos) 172 169 self.set_data(data) … … 256 253 self.Bind(wx.EVT_RADIOBUTTON, self.onWeighting, 257 254 id=self.dI_idata.GetId()) 258 self.dI_ didata.SetValue(True)255 self.dI_noweight.SetValue(True) 259 256 # add 4 types of weighting to the sizer 260 257 sizer_weighting.Add(self.dI_noweight, 0, wx.LEFT, 10) … … 266 263 sizer_weighting.Add(self.dI_idata) 267 264 sizer_weighting.Add((10, 10)) 268 self.dI_noweight.Enable( False)265 self.dI_noweight.Enable(True) 269 266 self.dI_didata.Enable(False) 270 267 self.dI_sqrdata.Enable(False) … … 1271 1268 if copy_flag: 1272 1269 self.get_paste_params(copy_flag) 1273 1270 wx.CallAfter(self._onDraw, None) 1274 1271 1275 1272 else: … … 1627 1624 elif data.dxl is not None or data.dxw is not None: 1628 1625 self.smear_type = "Slit" 1629 if data.dxl is not None and n ot numpy.all(data.dxl, 0):1626 if data.dxl is not None and numpy.all(data.dxl, 0): 1630 1627 self.dq_l = data.dxl[0] 1631 if data.dxw is not None and n ot numpy.all(data.dxw, 0):1628 if data.dxw is not None and numpy.all(data.dxw, 0): 1632 1629 self.dq_r = data.dxw[0] 1633 1630 # return self.smear_type,self.dq_l,self.dq_r … … 2016 2013 self.EditMask_title.Disable() 2017 2014 2018 self.on Smear(event=None)2015 self.on_smear_helper() 2019 2016 self.on_set_focus(None) 2020 2017 self.Refresh() -
src/sas/sasgui/perspectives/fitting/model_thread.py
rc1681ea rc1c9929 177 177 unsmeared_output = numpy.zeros((len(self.data.x))) 178 178 unsmeared_output[first_bin:last_bin+1] = self.model.evalDistribution(mask) 179 self.smearer.model = self.model 179 180 output = self.smearer(unsmeared_output, first_bin, last_bin) 180 181 -
src/sas/sasgui/guiframe/data_panel.py
rc8e1996 rcb1e9a5 520 520 Add a listcrtl in the panel 521 521 """ 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 525 535 self.tree_ctrl.Bind(CT.EVT_TREE_ITEM_CHECKING, self.on_check_item) 526 536 self.tree_ctrl.Bind(CT.EVT_TREE_ITEM_MENU, self.on_right_click_data) … … 557 567 wx.EVT_MENU(self, self.editmask_id, self.on_edit_data) 558 568 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, 562 570 style=wx.SUNKEN_BORDER) 563 571 self.tree_ctrl_theory.Bind(CT.EVT_TREE_ITEM_CHECKING, … … 565 573 self.tree_ctrl_theory.Bind(CT.EVT_TREE_ITEM_MENU, 566 574 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) 571 580 572 581 def on_right_click_theory(self, event):
Note: See TracChangeset
for help on using the changeset viewer.