Changeset 13a63ab in sasview
- Timestamp:
- May 13, 2011 3:26:08 PM (14 years ago)
- 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:
- a03d419
- Parents:
- f22e626
- Location:
- guiframe
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
guiframe/data_panel.py
r248b918 r13a63ab 15 15 import sys 16 16 import warnings 17 import logging 17 18 from wx.lib.scrolledpanel import ScrolledPanel 18 19 import wx.lib.agw.customtreectrl as CT … … 21 22 from sans.guiframe.panel_base import PanelBase 22 23 from sans.guiframe.events import StatusEvent 24 from sans.guiframe.events import EVT_DELETE_PLOTPANEL 23 25 from DataLoader.loader import Loader 24 import logging25 26 26 27 try: … … 129 130 self.fill_cbox_analysis(self.list_of_perspective) 130 131 self.Bind(wx.EVT_SHOW, self.on_close_page) 132 if self.parent is not None: 133 self.parent.Bind(EVT_DELETE_PLOTPANEL, self._on_delete_plot_panel) 131 134 132 135 … … 765 768 self.perspective_cbox.SetStringSelection(name) 766 769 self.enable_import() 770 771 def _on_delete_plot_panel(self, event): 772 """ 773 get an event with attribute name and caption to delete existing name 774 from the combobox of the current panel 775 """ 776 name = event.name 777 caption = event.caption 778 if self.cb_plotpanel is not None: 779 pos = self.cb_plotpanel.FindString(str(caption)) 780 if pos != wx.NOT_FOUND: 781 self.cb_plotpanel.Delete(pos) 782 self.enable_append() 767 783 768 784 def set_panel_on_focus(self, name=None): -
guiframe/events.py
r450ae05 r13a63ab 16 16 #slicer event 17 17 (SlicerEvent, EVT_SLICER) = wx.lib.newevent.NewEvent() 18 ## event that that destroy panel name in the datapanel combobox 19 (DeletePlotPanelEvent, EVT_DELETE_PLOTPANEL) = wx.lib.newevent.NewEvent() 18 20 ##event that allow to add more that to the same plot 19 21 (AddManyDataEvent, EVT_ADD_MANY_DATA) = wx.lib.newevent.NewEvent() -
guiframe/local_perspectives/plotting/plotting.py
rdf8a13e r13a63ab 16 16 from sans.guiframe.events import EVT_NEW_PLOT 17 17 from sans.guiframe.events import StatusEvent 18 from sans.guiframe.events import DeletePlotPanelEvent 18 19 from sans.guiframe.plugin_base import PluginBase 19 20 from sans.guiframe.dataFitting import Data1D … … 244 245 if group_id in self.plot_panels.keys(): 245 246 panel = self.plot_panels[group_id] 247 wx.PostEvent(self.parent, 248 DeletePlotPanelEvent(name=panel.window_caption, 249 caption=panel.window_caption)) 246 250 #remove menu item 247 251 self.delete_menu_item(panel.window_caption, panel.uid)
Note: See TracChangeset
for help on using the changeset viewer.