Changeset c5a769e in sasview for guiframe


Ignore:
Timestamp:
May 22, 2011 3:09:02 PM (14 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:
022af4d
Parents:
b3de12a4
Message:

more touch: move delete plot to p_panel from data_panel…

Location:
guiframe
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • guiframe/data_panel.py

    r026041c rc5a769e  
    255255        self.bt_add.SetToolTipString("Load data files") 
    256256        wx.EVT_BUTTON(self, self.bt_add.GetId(), self._load_data) 
    257         self.bt_remove = wx.Button(self, wx.NewId(), "Remove Data", 
     257        self.bt_remove = wx.Button(self, wx.NewId(), "Delete Data", 
    258258         size=(BUTTON_WIDTH, -1)) 
    259         self.bt_remove.SetToolTipString("Remove data from the application") 
     259        self.bt_remove.SetToolTipString("Delete data from the application") 
    260260        wx.EVT_BUTTON(self, self.bt_remove.GetId(), self.on_remove) 
    261261        self.bt_import = wx.Button(self, wx.NewId(), "Send To", 
     
    284284        wx.EVT_BUTTON(self, self.bt_freeze.GetId(), self.on_freeze) 
    285285        #hide plot 
    286         self.bt_close_plot = wx.Button(self, wx.NewId(), "Delete Plot",  
    287                                    size=(BUTTON_WIDTH, -1)) 
    288         self.bt_freeze.SetToolTipString("Delete the plot panel on focus") 
    289         wx.EVT_BUTTON(self, self.bt_close_plot.GetId(), self.on_close_plot) 
     286        #self.bt_close_plot = wx.Button(self, wx.NewId(), "Delete Plot",  
     287        #                           size=(BUTTON_WIDTH, -1)) 
     288        #self.bt_close_plot.SetToolTipString("Delete the plot panel on focus") 
     289        #wx.EVT_BUTTON(self, self.bt_close_plot.GetId(), self.on_close_plot) 
    290290        
    291291        self.cb_plotpanel = wx.ComboBox(self, -1,  
     
    306306                              ((10, 10)), 
    307307                              (self.bt_freeze), 
    308                               ((10, 10)), 
    309                               (self.bt_close_plot), 
     308                              #((10, 10)), 
     309                              #(self.bt_close_plot), 
    310310                              ((10, 10))]) 
    311311 
     
    788788        enable remove plot button if there is a plot panel on focus 
    789789        """ 
    790         if self.cb_plotpanel.GetCount() == 0: 
    791             self.bt_close_plot.Disable() 
    792         else: 
    793             self.bt_close_plot.Enable() 
     790        pass 
     791        #if self.cb_plotpanel.GetCount() == 0: 
     792        #    self.bt_close_plot.Disable() 
     793        #else: 
     794        #    self.bt_close_plot.Enable() 
    794795             
    795796    def enable_remove(self): 
  • guiframe/gui_manager.py

    r66141a0 rc5a769e  
    782782 
    783783            self._popup_floating_panel(p) 
    784              
     784   
    785785        # Register for showing/hiding the panel 
    786786        wx.EVT_MENU(self, ID, self.on_view) 
    787         if p not in self.plot_panels.values(): 
     787        if p not in self.plot_panels.values() and p.group_id != None: 
    788788            self.plot_panels[ID] = p 
    789789            if len(self.plot_panels) == 1: 
  • guiframe/local_perspectives/plotting/Plotter1D.py

    ra436b2e rc5a769e  
    8686        self.canvas.set_resizing(self.resizing) 
    8787        self.Bind(wx.EVT_SIZE, self._OnReSize) 
     88        self._add_more_tool() 
    8889        
    8990    def get_symbol_label(self): 
     
    484485                pass     
    485486        dlg.Destroy() 
     487 
     488    def _add_more_tool(self): 
     489        """ 
     490        Add refresh button in the tool bar 
     491        """ 
     492        if self.parent.__class__.__name__ != 'ViewerFrame': 
     493            return 
     494        self.toolbar.AddSeparator() 
     495        id_delete = wx.NewId() 
     496        delete =  wx.ArtProvider.GetBitmap(wx.ART_DELETE, wx.ART_TOOLBAR) 
     497        self.toolbar.AddSimpleTool(id_delete, delete, 
     498                           'Delete permanently', 'permanently Delete') 
     499 
     500        self.toolbar.Realize() 
     501        wx.EVT_TOOL(self, id_delete,  self._on_delete) 
     502 
     503    def _on_delete(self, event):  
     504        """ 
     505        Refreshes the plotpanel on refresh tollbar button 
     506        """ 
     507         
     508        if self.parent is not None: 
     509            wx.PostEvent(self.parent,  
     510                         NewPlotEvent(group_id=self.group_id, 
     511                                      action="delete")) 
     512             
  • guiframe/local_perspectives/plotting/Plotter2D.py

    rad1e49c rc5a769e  
    226226        slicerpop.Append(id, '&Copy to Clipboard', 'Copy to the clipboard') 
    227227        wx.EVT_MENU(self, id, self.OnCopyFigureMenu) 
    228          
     228        slicerpop.AppendSeparator() 
    229229        # saving data 
    230230        plot = self.data2D 
Note: See TracChangeset for help on using the changeset viewer.