Changeset fd51a7c in sasview
- Timestamp:
- Oct 12, 2011 4:04:01 PM (13 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:
- 26fc866
- Parents:
- da6fd1a
- Location:
- sansguiframe/src/sans/guiframe
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
sansguiframe/src/sans/guiframe/data_processor.py
r4c712ea4 rfd51a7c 91 91 self.AdjustScrollbars() 92 92 #self.SetLabelBackgroundColour('#DBD4D4') 93 self.uid = wx.NewId() 93 94 self.parent = parent 94 95 self.panel = panel … … 614 615 self.plot_button = None 615 616 self.notebook = None 617 self.list_plot_panels = {} 616 618 self.layout_grid() 617 619 self.layout_plotting_area() … … 678 680 grid = self.notebook.GetPage(pos) 679 681 title = self.notebook.GetPageText(pos) 680 681 682 group_id = wx.NewId() 682 683 683 for cell in grid.selected_cells: 684 684 row, col = cell … … 697 697 StatusEvent(status=msg, info="error")) 698 698 return 699 699 700 if issubclass(new_plot.__class__, Data1D): 700 new_plot.group_id = group_id 701 new_plot.list_group_id .append(group_id) 701 if label in self.list_plot_panels.keys(): 702 group_id = self.list_plot_panels[label] 703 else: 704 group_id = str(grid.uid) + str(new_plot.group_id) 705 self.list_plot_panels[label] = group_id 706 if group_id not in new_plot.list_group_id: 707 new_plot.group_id = group_id 708 new_plot.list_group_id.append(group_id) 702 709 else: 703 710 if label.lower() in ["data", "chi2"]: … … 710 717 return 711 718 wx.PostEvent(self.parent.parent, 719 NewPlotEvent(action="clear", 720 group_id=str(group_id), 721 title=title)) 722 wx.PostEvent(self.parent.parent, 712 723 NewPlotEvent(plot=new_plot, 713 group_id=str(new_plot.group_id),714 title=title))724 group_id=str(group_id), 725 title=title)) 715 726 else: 716 727 -
sansguiframe/src/sans/guiframe/local_perspectives/plotting/Plotter1D.py
r18253cd rfd51a7c 164 164 self.plots = {} 165 165 if self.is_zoomed: 166 166 self.is_zoomed = False 167 167 168 168 def _OnReSize(self, event): … … 279 279 if self.is_zoomed: 280 280 self.is_zoomed = False 281 281 282 282 283 283 def draw_plot(self): … … 287 287 self.draw() 288 288 289 290 291 289 def onLeftDown(self,event): 292 290 """ -
sansguiframe/src/sans/guiframe/local_perspectives/plotting/plotting.py
r0f17dd9 rfd51a7c 125 125 if group_id in self.plot_panels.keys(): 126 126 panel = self.plot_panels[group_id] 127 for plottable in panel.graph.plottables.keys(): 128 self.remove_plot(group_id, plottable.id) 127 129 panel.graph.reset() 128 130 return True 129 131 return False 130 132 131 132 133 def hide_panel(self, group_id): 133 134 """ … … 275 276 if group_id in self.plot_panels.keys(): 276 277 #remove data from panel 277 if event.action.lower() == 'remove':278 if event.action.lower().strip() == 'remove': 278 279 id = event.id 279 280 return self.remove_plot(group_id, id) 280 if event.action.lower() == 'hide':281 if event.action.lower().strip() == 'hide': 281 282 return self.hide_panel(group_id) 282 if event.action.lower() == 'delete':283 if event.action.lower().strip() == 'delete': 283 284 panel = self.plot_panels[group_id] 284 285 uid = panel.uid 285 286 return self.parent.delete_panel(uid) 286 if event.action.lower() == "clear":287 if event.action.lower().strip() == "clear": 287 288 return self.clear_panel_by_id(group_id) 288 289 if not hasattr(event, 'plot'):
Note: See TracChangeset
for help on using the changeset viewer.