Changeset 848913c in sasview for calculatorview
- Timestamp:
- Jun 21, 2012 7:33:44 PM (13 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:
- 19b9e43
- Parents:
- f5500b3
- Location:
- calculatorview/src/sans/perspectives/calculator
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
calculatorview/src/sans/perspectives/calculator/data_operator.py
rf5500b3 r848913c 100 100 self.data1_cbox = wx.ComboBox(self, -1, size=(_BOX_WIDTH, 25), 101 101 style=wx.CB_READONLY) 102 self.operator_cbox = wx.ComboBox(self, -1, size=(50, 25),102 self.operator_cbox = wx.ComboBox(self, -1, size=(50, -1), 103 103 style=wx.CB_READONLY) 104 104 operation_tip = "Add: +, Subtract: -, " … … 152 152 self.numberctr.Show(False) 153 153 else: 154 self.numberctr. Disable()154 self.numberctr.Enable(False) 155 155 wx.EVT_TEXT_ENTER(self.data_namectr, -1, self.on_name) 156 156 wx.EVT_TEXT_ENTER(self.numberctr, -1, self.on_number) … … 262 262 text = item.GetLabel().strip().lower() 263 263 if ON_MAC: 264 self.numberctr.Enable( )264 self.numberctr.Enable(text=='number') 265 265 else: 266 266 self.numberctr.Show(text=='number') … … 268 268 pos = item.GetSelection() 269 269 data = item.GetClientData(pos) 270 if not self.numberctr.IsShown(): 270 content = "?" 271 if not self.numberctr.IsShown() or self.numberctr.Disabled(): 271 272 if data == None: 272 273 content = "?" -
calculatorview/src/sans/perspectives/calculator/model_editor.py
rf5500b3 r848913c 381 381 item = event.GetEventObject() 382 382 text = item.GetValue().strip() 383 if text == '+': 383 if text == '*': 384 name = 'Multi' 385 factor = 'BackGround' 386 f_oper = '+' 387 elif text == '+': 384 388 name = 'Sum' 385 389 factor = 'scale_factor' 386 390 f_oper = '*' 387 elif text == '*': 388 name = 'Multi' 389 factor = 'BackGround' 390 f_oper = '+' 391 391 392 else: 392 raise 393 text = '+' 394 name = 'Sum' 395 factor = 'scale_factor' 396 f_oper = '*' 393 397 self.factor = str(factor) 394 398 self.operator = text
Note: See TracChangeset
for help on using the changeset viewer.