Changeset 5cf5f51 in sasview


Ignore:
Timestamp:
Oct 20, 2011 10:29:13 AM (13 years ago)
Author:
Jae Cho <jhjcho@…>
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:
8c7ba5b
Parents:
6b39d58
Message:

add mask to data panel for 2D

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sansguiframe/src/sans/guiframe/data_panel.py

    rbf39777 r5cf5f51  
    364364        Pop Up Data Editor 
    365365        """ 
    366         print "Edit Data" 
     366        selection = event.GetSelection() 
     367        id, _, _ = self.tree_ctrl.GetSelection().GetData() 
     368        data_list, _= self.parent._data_manager.get_by_id(id_list=[id]) 
     369         
     370        data = data_list.values()[0] 
     371        from sans.guiframe.local_perspectives.plotting.masking \ 
     372            import MaskPanel as MaskDialog 
     373         
     374        panel = MaskDialog(base=self, data=data, id=wx.NewId()) 
     375        #self.panel.Bind(wx.EVT_CLOSE, self._draw_masked_model) 
     376        panel.ShowModal() 
    367377         
    368378    def layout_data_list(self): 
     
    378388        self.data_menu = wx.Menu() 
    379389        id = wx.NewId() 
    380         name = "Edit" 
     390        name = "Edit Mask" 
    381391        msg = "Edit the current Data" 
    382392        self.data_menu.Append(id, name, msg) 
     
    399409        Allow Editing Data 
    400410        """ 
    401         print "on_right_click" 
    402         if self.data_menu is not None: 
     411        selection = event.GetSelection() 
     412        _, data_class_name, _ = self.tree_ctrl.GetSelection().GetData() 
     413        if data_class_name == "Data2D" and self.data_menu is not None: 
    403414            self.PopupMenu(self.data_menu)  
    404415         
Note: See TracChangeset for help on using the changeset viewer.