Ignore:
Timestamp:
Apr 9, 2012 11:44:49 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:
8b1d759
Parents:
cce182ae
Message:

Added showing "DataInfor?" from data panel as well as from plot

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sansguiframe/src/sans/guiframe/local_perspectives/plotting/Plotter2D.py

    r2a09236 r0aca693  
    316316        # saving data 
    317317        plot = self.data2D 
     318        id = wx.NewId() 
     319        name = plot.name 
     320        slicerpop.Append(id, "&Data Info" ) 
     321        wx.EVT_MENU(self, id, self._onDataShow) 
     322 
    318323        id = wx.NewId() 
    319324        name = plot.name 
     
    761766            path = None 
    762767            self.parent.save_data2d(self.data2D, default_name) 
    763          
     768             
     769    def _onDataShow(self, evt): 
     770        """ 
     771        Show the data set in text 
     772         
     773        :param evt: Menu event 
     774         
     775        """ 
     776        menu = evt.GetEventObject() 
     777        id = evt.GetId() 
     778        self.set_selected_from_menu(menu, id) 
     779        data = self.plots[self.graph.selected_plottable] 
     780        default_name = data.label 
     781        if default_name.count('.') > 0: 
     782            default_name = default_name.split('.')[0] 
     783        #default_name += "_out" 
     784        if self.parent != None: 
     785            self.parent.show_data2d(data, default_name) 
     786         
Note: See TracChangeset for help on using the changeset viewer.