Changeset 1da574d in sasview for calculatorview
- Timestamp:
- Jun 25, 2012 5:44:51 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:
- 21bc81b
- Parents:
- acc254f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
calculatorview/src/sans/perspectives/calculator/data_operator.py
racc254f r1da574d 209 209 if self._notes: 210 210 self.send_warnings(msg, 'error') 211 211 self.name_sizer.Layout() 212 212 self.Refresh() 213 213 … … 228 228 On selecting Number for Data2 229 229 """ 230 if event != None:231 event.Skip()232 230 self.send_warnings('') 233 231 if self.numberctr.IsEnabled(): … … 248 246 return 249 247 self.put_text_pic(self.data2_pic, content=str(val)) 250 self.check_data_inputs()248 wx.CallAfter(self.check_data_inputs) 251 249 if self.output != None: 252 250 self.output.name = str(self.data_namectr.GetValue()) 253 251 self.draw_output(self.output) 254 self. name_sizer.Layout()252 self.Refresh() 255 253 256 254 def on_select_data1(self, event=None): … … 269 267 else: 270 268 self.data1_pic.add_image(data) 271 self.check_data_inputs()269 wx.CallAfter(self.check_data_inputs) 272 270 if self.output != None: 273 271 self.output.name = str(self.data_namectr.GetValue()) … … 278 276 On Select an Operator 279 277 """ 280 if event != None:281 event.Skip()282 278 self.send_warnings('') 283 279 item = event.GetEventObject() 284 280 text = item.GetValue().strip() 285 281 self.put_text_pic(self.operator_pic, content=text) 286 self.check_data_inputs ()282 self.check_data_inputs 287 283 if self.output != None: 288 284 self.output.name = str(self.data_namectr.GetValue()) … … 293 289 On Selecting Data2 294 290 """ 295 if event != None:296 event.Skip()297 291 self.send_warnings('') 298 292 item = event.GetEventObject() 299 293 text = item.GetValue().strip().lower() 300 pos = item.GetCurrentSelection() 294 self._show_numctrl(self.numberctr, text=='number') 295 296 pos = item.GetSelection() 301 297 data = item.GetClientData(pos) 302 self._show_numctrl(self.numberctr, text=='number')303 298 content = "?" 304 299 if not (self.numberctr.IsShown() and self.numberctr.IsEnabled()): … … 319 314 data = None 320 315 item.SetClientData(pos, content) 321 322 316 self.put_text_pic(self.data2_pic, content) 323 self.check_data_inputs()317 wx.CallAfter(self.check_data_inputs) 324 318 325 319 if self.output != None: … … 334 328 pic.add_text() 335 329 pic.draw() 336 self.name_sizer.Layout()337 330 338 331 def check_data_inputs(self): … … 414 407 else: 415 408 out.add_image(output) 416 self.name_sizer.Layout() 409 wx.CallAfter(self.name_sizer.Layout) 410 self.Layout() 417 411 self.Refresh() 418 412
Note: See TracChangeset
for help on using the changeset viewer.