Changeset c985bef in sasview for sansview/perspectives/fitting
- Timestamp:
- Nov 9, 2009 3:10:00 PM (15 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, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- ffb838f
- Parents:
- e2f7b92
- Location:
- sansview/perspectives/fitting
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/basepage.py
re2f7b92 rc985bef 997 997 self.state_change= True 998 998 self._draw_model() 999 self.save_current_state()999 1000 1000 1001 1001 def _is_modified(self, is_modified): … … 1489 1489 if hasattr(self,"item[4]")and self.item[4] == None: 1490 1490 self.text2_3.Hide() 1491 ## check model parameters range1492 ## check m inimun value1491 1492 ## check model parameters range 1493 1493 param_min= None 1494 1494 param_max= None 1495 1495 ## check minimun value 1496 1496 if item[5]!= None: 1497 1497 if item[5].GetValue().lstrip().rstrip()!="": 1498 1498 param_min = float(item[5].GetValue()) 1499 is_modified = True 1499 1500 ## check maximum value 1500 1501 if item[6]!= None: 1501 1502 if item[6].GetValue().lstrip().rstrip()!="": 1502 1503 param_max = float(item[6].GetValue()) 1503 1504 is_modified = True 1504 1505 from sans.guiframe.utils import check_value 1505 1506 if param_min != None and param_max !=None: … … 1510 1511 if name in self.model.details.keys(): 1511 1512 self.model.details[name][1:]= param_min,param_max 1513 1512 1514 1513 1515 ## hide statictext +/- … … 1520 1522 1521 1523 value= float(item[2].GetValue()) 1522 #print "val", value,self.model.getParam(name) 1524 1523 1525 # If the value of the parameter has changed, 1524 1526 # +update the model and set the is_modified flag … … 1549 1551 self.disp_box.Hide() 1550 1552 self.sizer4_4.Clear(True) 1551 1552 1553 return 1553 1554 … … 1579 1580 self._draw_model() 1580 1581 #self.sizer4_4.Layout() 1581 #self.sizer 4.Layout()1582 #self.sizer5.Layout() 1582 1583 self.Layout() 1583 1584 #self.Refresh() … … 1643 1644 self.model.set_dispersion(p, disp_model) 1644 1645 except: 1646 1645 1647 pass 1646 1648 # Redraw the model … … 1652 1654 self.Layout() 1653 1655 #self.SetScrollbars(20,20,25,65) 1654 #self.Refresh()1656 self.Refresh() 1655 1657 1656 1658 -
sansview/perspectives/fitting/fitpage.py
re2f7b92 rc985bef 410 410 ix = 7 411 411 value= self.model.getParam(name3) 412 Tct l= BasicPage.ModelTextCtrl(self, -1, size=(_BOX_WIDTH/2,20),412 Tct2 = BasicPage.ModelTextCtrl(self, -1, size=(_BOX_WIDTH/2,20), 413 413 style=wx.TE_PROCESS_ENTER) 414 Tct l.SetValue(str (format_number(value)))415 self.sizer4_4.Add(Tct l, (iy,ix),(1,1),414 Tct2.SetValue(str (format_number(value))) 415 self.sizer4_4.Add(Tct2, (iy,ix),(1,1), 416 416 wx.EXPAND|wx.ADJUST_MINSIZE, 0) 417 417 ix +=1 … … 419 419 wx.EXPAND|wx.ADJUST_MINSIZE, 0) 420 420 421 self.fixed_param.append([None,name3, Tct l421 self.fixed_param.append([None,name3, Tct2 422 422 ,None,None,None, None,None]) 423 423 … … 524 524 ix = 7 525 525 value= self.model.getParam(name3) 526 Tct l= BasicPage.ModelTextCtrl(self, -1, size=(_BOX_WIDTH/2,20),526 Tct2 = BasicPage.ModelTextCtrl(self, -1, size=(_BOX_WIDTH/2,20), 527 527 style=wx.TE_PROCESS_ENTER) 528 Tct l.SetValue(str (format_number(value)))528 Tct2.SetValue(str (format_number(value))) 529 529 if self.data.__class__.__name__ =="Data2D": 530 Tct l.Show(True)530 Tct2.Show(True) 531 531 else: 532 Tct l.Hide()533 self.sizer4_4.Add(Tct l, (iy,ix),(1,1),532 Tct2.Hide() 533 self.sizer4_4.Add(Tct2, (iy,ix),(1,1), 534 534 wx.EXPAND|wx.ADJUST_MINSIZE, 0) 535 535 ix +=1 536 536 #self.sizer4_4.Add((20,20), (iy,ix),(1,1), 537 537 #wx.EXPAND|wx.ADJUST_MINSIZE, 0) 538 self.fixed_param.append([None,name3, Tct l538 self.fixed_param.append([None,name3, Tct2 539 539 ,None,None, None, None,None]) 540 540 541 self.orientation_params_disp.append([None,name3, Tct l541 self.orientation_params_disp.append([None,name3, Tct2 542 542 ,None,None, None, None,None]) 543 543 #Display units text on panel … … 685 685 if self.state_change: 686 686 #self._undo.Enable(True) 687 self.save_current_state() 687 688 event = PageInfoEvent(page = self) 688 689 wx.PostEvent(self.parent, event) … … 715 716 is_modified =self._check_value_enter( self.fittable_param ,is_modified) 716 717 is_modified =self._check_value_enter( self.fixed_param ,is_modified) 717 is_modified =self._check_value_enter( self.parameters ,is_modified) 718 718 is_modified =self._check_value_enter( self.parameters ,is_modified) 719 print "r",is_modified 719 720 #self._onparamEnter_helper() 720 721 tcrtl.Refresh() … … 746 747 reset the state 747 748 """ 749 748 750 self.reset_page_helper(state) 749 751 import sans.guiframe.gui_manager … … 752 754 753 755 self.manager._on_change_engine(engine=self.engine_type) 756 757 #self.state = self 758 self.save_current_state_fit() 759 #self.set_model_param_sizer(model=state.model) 760 self.Layout() 761 self.Refresh() 754 762 755 756 763 def get_range(self): 757 764 """
Note: See TracChangeset
for help on using the changeset viewer.