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

Location:
sansguiframe/src/sans/guiframe/local_perspectives/plotting
Files:
2 edited

Legend:

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

    r4a9bce1 r0aca693  
    410410                        pass 
    411411                plot_menu.AppendSeparator() 
    412      
     412                 
     413            id = wx.NewId() 
     414            plot_menu.Append(id, "&DataInfo", name) 
     415            wx.EVT_MENU(self, id, self. _onDataShow) 
    413416            id = wx.NewId() 
    414417            plot_menu.Append(id, "&Save Points as a File", name) 
     
    657660            self.parent.save_data1d(data, default_name) 
    658661 
     662                        
     663    def _onDataShow(self, evt): 
     664        """ 
     665        Show the data set in text 
     666         
     667        :param evt: Menu event 
     668         
     669        """ 
     670        menu = evt.GetEventObject() 
     671        id = evt.GetId() 
     672        self.set_selected_from_menu(menu, id) 
     673        data = self.plots[self.graph.selected_plottable] 
     674        default_name = data.label 
     675        if default_name.count('.') > 0: 
     676            default_name = default_name.split('.')[0] 
     677        #default_name += "_out" 
     678        if self.parent != None: 
     679            self.parent.show_data1d(data, default_name) 
     680             
    659681    def _add_more_tool(self): 
    660682        """ 
  • 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.