Changeset 66aeb15 in sasview for src/sas/sasgui/guiframe


Ignore:
Timestamp:
Mar 2, 2017 3:48:43 PM (8 years ago)
Author:
Paul Kienzle <pkienzle@…>
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:
4afe1ba
Parents:
a97aebd
Message:

data panel: put the data/theory label in the tree root so it is visible even when the tree is closed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/guiframe/data_panel.py

    rcb1e9a5 r66aeb15  
    7474    Check list control to be used for Data Panel 
    7575    """ 
    76     def __init__(self, parent, *args, **kwds): 
     76    def __init__(self, parent, root, *args, **kwds): 
    7777        # agwstyle is introduced in wx.2.8.11 but is not working for mac 
    7878        if IS_MAC and wx_version < 812: 
     
    9797                    del kwds['style'] 
    9898                    CT.CustomTreeCtrl.__init__(self, parent, *args, **kwds) 
    99         self.root = self.AddRoot("Available Data") 
     99        self.root = self.AddRoot(root) 
    100100 
    101101    def OnCompareItems(self, item1, item2): 
     
    531531        theory_sizer.SetMinSize(wx.Size(w/13, h*2/5)) 
    532532 
    533         self.tree_ctrl = DataTreeCtrl(parent=splitter, style=wx.SUNKEN_BORDER) 
     533        self.tree_ctrl = DataTreeCtrl(parent=splitter, 
     534                                      style=wx.SUNKEN_BORDER, 
     535                                      root="Available Data") 
    534536 
    535537        self.tree_ctrl.Bind(CT.EVT_TREE_ITEM_CHECKING, self.on_check_item) 
     
    568570 
    569571        self.tree_ctrl_theory = DataTreeCtrl(parent=splitter, 
    570                                              style=wx.SUNKEN_BORDER) 
     572                                             style=wx.SUNKEN_BORDER, 
     573                                             root="Available Theory") 
    571574        self.tree_ctrl_theory.Bind(CT.EVT_TREE_ITEM_CHECKING, 
    572575                                   self.on_check_item) 
    573576        self.tree_ctrl_theory.Bind(CT.EVT_TREE_ITEM_MENU, 
    574577                                   self.on_right_click_theory) 
    575         self.tree_ctrl.InsertItem(self.tree_ctrl.root, -1, " Data") 
    576         self.tree_ctrl_theory.InsertItem(self.tree_ctrl_theory.root, 
    577                                          -1, " Theory") 
    578578        splitter.SplitHorizontally(self.tree_ctrl, self.tree_ctrl_theory) 
    579579        self.sizer1.Add(splitter, 1, wx.EXPAND | wx.ALL, 10) 
Note: See TracChangeset for help on using the changeset viewer.