Changeset 2a7722b in sasview for src/sas/sasgui/perspectives/file_converter/converter_panel.py
- Timestamp:
- Jul 14, 2016 12:19:22 PM (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:
- 1aad14e
- Parents:
- de0df2c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/file_converter/converter_panel.py
rde0df2c r2a7722b 12 12 from sas.sasgui.perspectives.file_converter.meta_panels import MetadataWindow 13 13 from sas.sasgui.perspectives.file_converter.meta_panels import DetectorPanel 14 from sas.sasgui.perspectives.file_converter.meta_panels import SamplePanel 14 15 from sas.sasgui.guiframe.events import StatusEvent 15 16 from sas.sasgui.guiframe.dataFitting import Data1D … … 17 18 from sas.sascalc.dataloader.readers.cansas_reader import Reader as CansasReader 18 19 from sas.sascalc.dataloader.data_info import Detector 20 from sas.sascalc.dataloader.data_info import Sample 19 21 from sas.sascalc.dataloader.data_info import Vector 20 22 … … 55 57 'run_name': None, 56 58 'instrument': None, 57 'detector': [Detector()] 59 'detector': [Detector()], 60 'sample': Sample() 58 61 } 59 62 self.vectors = ['offset', 'orientation', 'pixel_size', 'beam_center'] … … 194 197 detector_frame.Show(True) 195 198 199 def show_sample_window(self, event): 200 if self.meta_frames != []: 201 for frame in self.meta_frames: 202 frame.panel.on_close() 203 sample_frame = MetadataWindow(SamplePanel, 204 parent=self.parent.manager.parent, manager=self, 205 metadata=self.metadata['sample'], title='Sample Metadata') 206 self.meta_frames.append(sample_frame) 207 self.parent.manager.put_icon(sample_frame) 208 sample_frame.Show(True) 209 196 210 def metadata_changed(self, event): 197 211 event.Skip() … … 300 314 y += 1 301 315 316 sample_label = wx.StaticText(metadata_pane, -1, "Sample: ") 317 metadata_grid.Add(sample_label, (y,0), (1,1), wx.ALL | wx.EXPAND, 5) 318 sample_btn = wx.Button(metadata_pane, -1, "Enter Sample Metadata") 319 metadata_grid.Add(sample_btn, (y,1), (1,1), wx.ALL | wx.EXPAND, 5) 320 sample_btn.Bind(wx.EVT_BUTTON, self.show_sample_window) 321 y += 1 322 302 323 metadata_pane.SetSizer(metadata_grid) 303 324
Note: See TracChangeset
for help on using the changeset viewer.