Ignore:
Timestamp:
Jul 14, 2016 11:59:05 AM (8 years ago)
Author:
lewis
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:
2a7722b
Parents:
af84162
git-author:
Lewis O'Driscoll <lewis.o'driscoll@…> (07/14/16 11:38:21)
git-committer:
Lewis O'Driscoll <lewis.o'driscoll@…> (07/14/16 11:59:05)
Message:

Abstract MetadataPanel? from DetectorPanel?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/perspectives/file_converter/converter_panel.py

    raf84162 rde0df2c  
    1010from sas.sasgui.perspectives.calculator import calculator_widgets as widget 
    1111from sas.sasgui.perspectives.file_converter.converter_widgets import VectorInput 
    12 from sas.sasgui.perspectives.file_converter.detector_panel import DetectorWindow 
     12from sas.sasgui.perspectives.file_converter.meta_panels import MetadataWindow 
     13from sas.sasgui.perspectives.file_converter.meta_panels import DetectorPanel 
    1314from sas.sasgui.guiframe.events import StatusEvent 
    1415from sas.sasgui.guiframe.dataFitting import Data1D 
     
    4243        self.base = base 
    4344        self.parent = parent 
    44         self.detector_frame = None 
     45        self.meta_frames = [] 
    4546 
    4647        self.q_input = None 
     
    183184 
    184185    def show_detector_window(self, event): 
    185         if self.detector_frame is not None: 
    186             self.detector_frame.panel.on_close() 
    187             return 
    188         self.detector_frame = DetectorWindow(self.parent.manager.parent, 
    189             manager=self, detector=self.metadata['detector'][0]) 
    190         self.parent.manager.put_icon(self.detector_frame) 
    191         self.detector_frame.Show(True) 
     186        if self.meta_frames != []: 
     187            for frame in self.meta_frames: 
     188                frame.panel.on_close() 
     189        detector_frame = MetadataWindow(DetectorPanel, 
     190            parent=self.parent.manager.parent, manager=self, 
     191            metadata=self.metadata['detector'][0], title='Detector Metadata') 
     192        self.meta_frames.append(detector_frame) 
     193        self.parent.manager.put_icon(detector_frame) 
     194        detector_frame.Show(True) 
    192195 
    193196    def metadata_changed(self, event): 
Note: See TracChangeset for help on using the changeset viewer.