Changeset 19b9e43 in sasview for calculatorview/src/sans/perspectives/calculator
- Timestamp:
- Jun 21, 2012 8:07: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:
- c8654a3
- Parents:
- 848913c
- Location:
- calculatorview/src/sans/perspectives/calculator
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
calculatorview/src/sans/perspectives/calculator/data_operator.py
r848913c r19b9e43 149 149 (old_data2_sizer, 0, wx.TOP, 5)]) 150 150 self.data2_cbox.Show(True) 151 if not ON_MAC: 152 self.numberctr.Show(False) 153 else: 154 self.numberctr.Enable(False) 151 152 self.numberctr.Show(False) 153 155 154 wx.EVT_TEXT_ENTER(self.data_namectr, -1, self.on_name) 156 155 wx.EVT_TEXT_ENTER(self.numberctr, -1, self.on_number) … … 261 260 item = event.GetEventObject() 262 261 text = item.GetLabel().strip().lower() 263 if ON_MAC: 264 self.numberctr.Enable(text=='number') 265 else: 266 self.numberctr.Show(text=='number') 262 self.numberctr.Show(text=='number') 267 263 268 264 pos = item.GetSelection() 269 265 data = item.GetClientData(pos) 270 266 content = "?" 271 if not self.numberctr.IsShown() or self.numberctr.Disabled():267 if not self.numberctr.IsShown(): 272 268 if data == None: 273 269 content = "?" … … 317 313 self.output = None 318 314 return flag 319 if self.numberctr.IsShown() or (ON_MAC and self.numberctr.Enabled()):315 if self.numberctr.IsShown(): 320 316 self.numberctr.SetBackgroundColour('white') 321 317 try: … … 454 450 pos3 = self.data2_cbox.Append("Number") 455 451 val = None 456 if self.numberctr.IsShown() or \ 457 (ON_MAC and self.numberctr.Enabled()): 452 if self.numberctr.IsShown(): 458 453 try: 459 454 val = float(self.numberctr.GetValue()) … … 470 465 pos3 = self.data2_cbox.Append('Number') 471 466 val = None 472 if self.numberctr.IsShown() or \ 473 (ON_MAC and self.numberctr.Enabled()): 467 if self.numberctr.IsShown(): 474 468 try: 475 469 val = float(self.numberctr.GetValue()) -
calculatorview/src/sans/perspectives/calculator/model_editor.py
r848913c r19b9e43 251 251 if text == '+': 252 252 mname = 'Sum' 253 elif text == '*': 254 mname = 'Multi' 253 255 else: 254 mname = 'Multi' 256 text = '+' 257 mname = 'Sum' 255 258 mname += M_NAME 256 259 title = mname … … 389 392 factor = 'scale_factor' 390 393 f_oper = '*' 391 392 394 else: 393 395 text = '+' … … 433 435 f_oper = '*' 434 436 default_val = '1.0' 435 el se:437 elif text == '*': 436 438 factor = 'BackGround' 437 439 f_oper = '+' 438 440 default_val = '0.0' 441 else: 442 text = '+' 443 factor = 'scale_factor' 444 f_oper = '*' 445 default_val = '1.0' 439 446 path = self.fname 440 447 try:
Note: See TracChangeset
for help on using the changeset viewer.