Changeset 199b515e in sasview
- Timestamp:
- Oct 10, 2016 4:02:19 PM (8 years ago)
- Parents:
- 68669da (diff), 8662a58 (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. - git-author:
- Andrew Jackson <andrew.jackson@…> (10/10/16 16:02:19)
- git-committer:
- GitHub <noreply@…> (10/10/16 16:02:19)
- Location:
- src/sas/sasgui/perspectives/fitting
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/fitting/basepage.py
r4109bd5 r8662a58 1382 1382 self.state.npts = self.npts_x 1383 1383 1384 def _onparamEnter_helper(self ):1384 def _onparamEnter_helper(self, is_modified=False): 1385 1385 """ 1386 1386 check if values entered by the user are changed and valid to replot … … 1388 1388 """ 1389 1389 # Flag to register when a parameter has changed. 1390 is_modified = False1390 #is_modified = False 1391 1391 self.fitrange = True 1392 1392 is_2Ddata = False … … 1396 1396 is_2Ddata = True 1397 1397 if self.model != None: 1398 is_modified = (self._check_value_enter(self.fittable_param) 1399 or self._check_value_enter(self.fixed_param) 1400 or self._check_value_enter(self.parameters)) 1398 #Either we get a is_modified = True passed in because 1399 #_update_paramv_on_fit() has been called already or 1400 # we need to check here ourselves. 1401 if not is_modified: 1402 is_modified = (self._check_value_enter(self.fittable_param) 1403 or self._check_value_enter(self.fixed_param) 1404 or self._check_value_enter(self.parameters)) 1401 1405 1402 1406 # Here we should check whether the boundaries have been modified. … … 1436 1440 self.Refresh() 1437 1441 1438 logging.info("is_modified flag set to %g",is_modified)1442 #logging.info("is_modified flag set to %g",is_modified) 1439 1443 return is_modified 1440 1444 … … 1446 1450 flag = True 1447 1451 self.fitrange = True 1452 is_modified = False 1448 1453 1449 1454 #wx.PostEvent(self._manager.parent, StatusEvent(status=" \ … … 1458 1463 [self.data]) 1459 1464 ##Check the values 1460 self._check_value_enter(self.fittable_param)1461 self._check_value_enter(self.fixed_param)1462 self._check_value_enter(self.parameters)1465 is_modified = (self._check_value_enter(self.fittable_param) 1466 or self._check_value_enter(self.fixed_param) 1467 or self._check_value_enter(self.parameters)) 1463 1468 1464 1469 # If qmin and qmax have been modified, update qmin and qmax and … … 1542 1547 logging.error(traceback.format_exc()) 1543 1548 1544 return flag 1549 return flag,is_modified 1545 1550 1546 1551 def _reset_parameters_state(self, listtorestore, statelist): -
src/sas/sasgui/perspectives/fitting/fitpage.py
rb4818d9 r8662a58 996 996 self.create_default_data() 997 997 """ 998 flag = self._update_paramv_on_fit()999 1000 wx.CallAfter(self._onparamEnter_helper )998 flag,is_modified = self._update_paramv_on_fit() 999 1000 wx.CallAfter(self._onparamEnter_helper(is_modified)) 1001 1001 if not flag: 1002 1002 msg = "The parameters are invalid"
Note: See TracChangeset
for help on using the changeset viewer.