Changeset 55775e8 in sasview
- Timestamp:
- Jul 20, 2016 10:41:34 AM (8 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, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 3ea9371
- Parents:
- 13b9a63
- Location:
- src/sas/sasgui/perspectives/file_converter
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/file_converter/converter_panel.py
r13b9a63 r55775e8 67 67 68 68 self.metadata['detector'][0].name = '' 69 self.metadata['source'].radiation = 'neutron' 69 70 70 71 self._do_layout() … … 218 219 self.data_type = dtype 219 220 221 def radiationtype_changed(self, event): 222 event.Skip() 223 rtype = event.GetEventObject().GetValue().lower() 224 self.metadata['source'].radiation = rtype 225 220 226 def metadata_changed(self, event): 221 227 event.Skip() … … 283 289 y += 1 284 290 291 radiation_label = wx.StaticText(self, -1, "Radiation Type: ") 292 input_grid.Add(radiation_label, (y,0), (1,1), wx.ALL, 5) 293 radiation_input = wx.ComboBox(self, -1, 294 choices=["Neutron", "X-Ray", "Muon", "Electron"], 295 name="radiation", style=wx.CB_READONLY, value="Neutron") 296 radiation_input.Bind(wx.EVT_COMBOBOX, self.radiationtype_changed) 297 input_grid.Add(radiation_input, (y,1), (1,1)) 298 y += 1 299 285 300 output_label = wx.StaticText(self, -1, "Output File: ") 286 301 input_grid.Add(output_label, (y,0), (1,1), wx.ALIGN_CENTER_VERTICAL, 5) … … 288 303 self.output = wx.FilePickerCtrl(self, -1, 289 304 size=(_STATICBOX_WIDTH-80, -1), 290 message="Chose the Intensity datafile.",305 message="Chose where to save the output file.", 291 306 style=wx.FLP_SAVE | wx.FLP_OVERWRITE_PROMPT | wx.FLP_USE_TEXTCTRL, 292 307 wildcard="*.xml") … … 317 332 windows = ['detector', 'sample', 'source'] 318 333 for item in self.metadata.keys(): 334 # Don't make fields for properties that have their own windows 319 335 if item in windows: continue 320 336 label_txt = item.replace('_', ' ').capitalize() -
src/sas/sasgui/perspectives/file_converter/meta_panels.py
r55bc56bc r55775e8 333 333 y += 1 334 334 335 radiation_label = wx.StaticText(self, -1, "Radiation: ")336 input_grid.Add(radiation_label, (y,0), (1,1), wx.ALL, 5)337 radiation_input = wx.ComboBox(self, -1,338 choices=["neutron", "x-ray", "muon", "electron"],339 name="radiation", style=wx.CB_READONLY)340 radiation_input.Bind(wx.EVT_COMBOBOX, self.on_change)341 input_grid.Add(radiation_input, (y,1), (1,1))342 y += 1343 344 335 size_label = wx.StaticText(self, -1, "Beam Size (mm): ") 345 336 input_grid.Add(size_label, (y,0), (1,1), wx.ALL, 5) … … 393 384 y += 1 394 385 395 396 386 name_input.SetValue(self.get_property_string("name")) 397 radiation_input.SetValue(self.get_property_string("radiation"))398 387 size_input.SetValue(self.metadata.beam_size) 399 388 shape_input.SetValue(self.get_property_string("beam_shape"))
Note: See TracChangeset
for help on using the changeset viewer.