Changeset c5dca87 in sasview for calculatorview/perspectives/calculator/collimation_editor.py
- Timestamp:
- May 6, 2010 1:44:57 PM (14 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:
- e6093db
- Parents:
- 85e665e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
calculatorview/perspectives/calculator/collimation_editor.py
r85e665e rc5dca87 69 69 collimation_name_txt.SetToolTipString(hint_collimation_txt) 70 70 self.collimation_cbox = wx.ComboBox(self, -1, style=wx.CB_READONLY) 71 wx.EVT_COMBOBOX(self.collimation_cbox, -1, self.on_select_collimation) 71 72 hint_collimation_name_txt = 'Name of collimations.' 72 73 self.collimation_cbox.SetToolTipString(hint_collimation_name_txt) … … 229 230 self.enable_collimation() 230 231 self.bt_add_aperture.Enable() 232 self.fill_aperture_combox() 233 self.enable_aperture() 231 234 self.set_values() 232 235 … … 258 261 self.enable_aperture() 259 262 263 def on_select_collimation(self, event): 264 """ 265 fill the control on the panel according to the current selected collimation 266 """ 267 self.set_values() 268 self.fill_aperture_combox() 269 self.enable_aperture() 270 260 271 def enable_collimation(self): 261 272 """ … … 366 377 n_aperture = self.aperture_cbox.GetCount() 367 378 aperture_hint_txt = 'apertures available: %s '%str(n_aperture) 368 if len(collimation.aperture) > 1:379 if len(collimation.aperture) > 0: 369 380 self.bt_remove_aperture.Enable() 370 381 else: … … 393 404 fill the current combobox with the available aperture 394 405 """ 406 self.aperture_cbox.Clear() 395 407 collimation, _, _ = self.get_current_collimation() 396 408 if collimation is None or not collimation.aperture: 397 409 return 398 399 410 for aperture in collimation.aperture: 400 411 pos = self.aperture_cbox.Append(str(aperture.name))
Note: See TracChangeset
for help on using the changeset viewer.