Changeset c8654a3 in sasview for calculatorview/src/sans/perspectives/calculator
- Timestamp:
- Jun 22, 2012 1:09:26 PM (12 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:
- 30bc3045
- Parents:
- 19b9e43
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
calculatorview/src/sans/perspectives/calculator/model_editor.py
r19b9e43 rc8654a3 248 248 title = self.name_tcl.GetValue().lstrip().rstrip() 249 249 if title == '': 250 text = self.operator _cbox.GetLabel().strip()251 if text == '+':250 text = self.operator 251 if text.count('+') > 0: 252 252 mname = 'Sum' 253 el if text == '*':253 else: 254 254 mname = 'Multi' 255 else:256 text = '+'257 mname = 'Sum'258 255 mname += M_NAME 259 256 title = mname … … 381 378 if event != None: 382 379 event.Skip() 383 380 name = '' 384 381 item = event.GetEventObject() 385 text = item.GetValue() .strip()386 if text == '*':382 text = item.GetValue() 383 if text.count('*') > 0: 387 384 name = 'Multi' 388 385 factor = 'BackGround' 389 386 f_oper = '+' 390 el if text == '+':387 else: 391 388 name = 'Sum' 392 389 factor = 'scale_factor' 393 390 f_oper = '*' 394 else: 395 text = '+' 396 name = 'Sum' 397 factor = 'scale_factor' 398 f_oper = '*' 399 self.factor = str(factor) 391 392 self.factor = factor 400 393 self.operator = text 401 394 self.explanation = " Custom Model = %s %s (model1 %s model2)\n"% \ … … 430 423 description = name1 + self.operator + name2 431 424 name = self.name_tcl.GetValue().lstrip().rstrip() 432 text = self.operator_cbox.Get Label().strip()433 if text == '+':425 text = self.operator_cbox.GetValue() 426 if text.count('+') > 0: 434 427 factor = 'scale_factor' 435 428 f_oper = '*' 436 429 default_val = '1.0' 437 el if text == '*':430 else: 438 431 factor = 'BackGround' 439 432 f_oper = '+' 440 433 default_val = '0.0' 441 else:442 text = '+'443 factor = 'scale_factor'444 f_oper = '*'445 default_val = '1.0'446 434 path = self.fname 447 435 try:
Note: See TracChangeset
for help on using the changeset viewer.