Changeset 8662a58 in sasview for src/sas/sasgui/perspectives/fitting
- Timestamp:
- Oct 10, 2016 4:01:05 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:
- 3bec50a, f22b43c, 199b515e
- Parents:
- 68669da
- 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.