Changeset bffa3d0 in sasview


Ignore:
Timestamp:
Mar 23, 2011 1:32:00 PM (14 years ago)
Author:
Gervaise Alina <gervyh@…>
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, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
5cc39f10
Parents:
72323d1
Message:

working on freeze theory

Location:
guiframe
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • guiframe/data_manager.py

    rec611aad rbffa3d0  
    212212                        selected_theory[new_theory.id] = DataState(new_theory) 
    213213                        self.stored_data[new_theory.id] = selected_theory[new_theory.id] 
    214                     else: 
    215                         msg = "Theory with ID %s " % str(t_id) 
    216                         msg += "couldn't not be frozen"  
    217                         raise ValueError, msg 
     214 
    218215        return selected_theory 
    219216                     
  • guiframe/data_panel.py

    r71bd773 rbffa3d0  
    100100        """ 
    101101        select_txt = wx.StaticText(self, -1, 'Selection Options') 
     102        select_txt.SetForegroundColour('blue') 
    102103        self.selection_cbox = wx.ComboBox(self, -1, style=wx.CB_READONLY) 
    103104        list_of_options = ['Select all Data', 
     
    290291        self.theory_root = self.tree_ctrl.InsertItem(self.tree_ctrl.root,0, 
    291292                                                   "THEORIES", ct_type=0) 
    292          
     293     
     294    def new_layout_data_list(self): 
     295        """ 
     296        Add a listcrtl in the panel 
     297        """ 
     298        tree_ctrl_label = wx.StaticText(self, -1, "Data") 
     299        tree_ctrl_label.SetForegroundColour('blue') 
     300        self.tree_ctrl = DataTreeCtrl(parent=self) 
     301        self.tree_ctrl.Bind(CT.EVT_TREE_ITEM_CHECKING, self.on_check_item) 
     302        tree_ctrl_theory_label = wx.StaticText(self, -1, "Theory") 
     303        tree_ctrl_theory_label.SetForegroundColour('blue') 
     304        self.tree_ctrl_theory = DataTreeCtrl(parent=self) 
     305        self.tree_ctrl_theory.Bind(CT.EVT_TREE_ITEM_CHECKING, self.on_check_item) 
     306        self.sizer1.Add(tree_ctrl_label, 0, wx.LEFT, 10) 
     307        self.sizer1.Add(self.tree_ctrl, 1, wx.EXPAND|wx.ALL, 10) 
     308        self.sizer1.Add(tree_ctrl_theory_label, 0,  wx.LEFT, 10) 
     309        self.sizer1.Add(self.tree_ctrl_theory, 1, wx.EXPAND|wx.ALL, 10) 
     310            
    293311    def onContextMenu(self, event):  
    294312        """ 
     
    403421                                       state_id=state_id,  
    404422                                       theory_list=theory_list) 
     423    def new_append_theory(self, state_id, theory_list): 
     424        """ 
     425        append theory object under data from a state of id = state_id 
     426        replace that theory if  already displayed 
     427        """ 
     428        if not theory_list: 
     429            return  
     430        if state_id not in self.list_cb_data.keys(): 
     431            root = self.tree_ctrl_theory.root 
     432        else: 
     433            item = self.list_cb_data[state_id] 
     434            data_c, _, _, _, _, _ = item 
     435            root = data_c 
     436        if root is not None: 
     437             self.append_theory_helper(root=root,  
     438                                       state_id=state_id,  
     439                                       theory_list=theory_list) 
     440       
    405441       
    406442    def append_theory_helper(self, root, state_id, theory_list): 
Note: See TracChangeset for help on using the changeset viewer.