Changeset dfa1579 in sasview for src/sas/sasgui


Ignore:
Timestamp:
Mar 30, 2017 9:47:56 AM (8 years ago)
Author:
krzywon
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.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
a099131
Parents:
df27aa8
git-author:
Jeff Krzywon <krzywon@…> (03/30/17 09:47:56)
git-committer:
krzywon <krzywon@…> (03/30/17 09:47:56)
Message:

Remove 1D data from batch slice list. Keep initial data set checked. Remove unused parameter.

Location:
src/sas/sasgui/guiframe/local_perspectives/plotting
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/guiframe/local_perspectives/plotting/Plotter2D.py

    re075203 rdfa1579  
    128128        self.title_font = None 
    129129        self.title_color = 'black' 
    130         self.batch_slicer = None 
    131130        ## Graph 
    132131        self.graph = Graph() 
  • src/sas/sasgui/guiframe/local_perspectives/plotting/parameters_panel_slicer.py

    rdf27aa8 rdfa1579  
    99from sas.sasgui.guiframe.events import SlicerParameterEvent, SlicerEvent 
    1010from Plotter2D import ModelPanel2D 
     11from sas.sascalc.dataloader.data_info import Data1D, Data2D 
    1112 
    1213 
     
    136137                         wx.LEFT | wx.EXPAND | wx.ADJUST_MINSIZE, 15) 
    137138            iy += 1 
    138             id = wx.NewId() 
    139             main_window = self.parent.parent 
    140             self.loaded_data = main_window._data_manager.data_name_dict 
    141             # TODO: remove 1D data from choices 
    142             # TODO: auto check current data set 
    143             choices = self.loaded_data.keys() 
    144             self.data_list = wx.CheckListBox(parent=self, id=id, 
    145                                         choices=choices, 
    146                                         name="Apply Slicer to Data Sets:") 
     139            self.process_list() 
    147140            self.bck.Add(self.data_list, (iy, ix), (1, 1), 
    148141                         wx.LEFT | wx.EXPAND | wx.ADJUST_MINSIZE, 15) 
     
    274267            for child_ctrl in data_ctrl.GetChildren(): 
    275268                self.tree_ctrl.CheckItem(child_ctrl, check_value) 
     269 
     270    def process_list(self): 
     271        main_window = self.parent.parent 
     272        self.loaded_data = [] 
     273        id = wx.NewId() 
     274        for key, value in main_window._data_manager.stored_data.iteritems(): 
     275            if isinstance(value.data, Data2D): 
     276                self.loaded_data.append(value.data.name) 
     277            if key == self.parent.data2D.id: 
     278                self.checkme = self.loaded_data.index(value.data.name) 
     279        self.data_list = wx.CheckListBox(parent=self, id=id, 
     280                                         choices=self.loaded_data, 
     281                                         name="Apply Slicer to Data Sets:") 
     282        self.data_list.Check(self.checkme) 
     283        self.data_list.Bind(wx.EVT_CHECKLISTBOX, self.onCheckBoxList) 
     284 
     285    def onCheckBoxList(self, e): 
     286        index = e.GetSelection() 
     287        if index == self.checkme: 
     288            self.data_list.Check(index) 
Note: See TracChangeset for help on using the changeset viewer.