Changeset 70ec588d in sasview for plottools/src/danse/common
- Timestamp:
- Jan 10, 2012 12:42:28 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:
- 592cb156
- Parents:
- cfe1feb
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
plottools/src/danse/common/plottools/PlotPanel.py
r0e553fd r70ec588d 265 265 # check if zoomed. 266 266 self.is_zoomed = False 267 # Plottables 268 self.plots = {} 267 269 268 270 # Default locations … … 640 642 """ 641 643 list = {} 644 menu = event.GetEventObject() 645 id = event.GetId() 646 self.set_selected_from_menu(menu, id) 642 647 plotlist = self.graph.returnPlottable() 643 648 if self.graph.selected_plottable is not None: … … 661 666 self.xmin, self.xmax) 662 667 dlg.ShowModal() 663 668 669 def set_selected_from_menu(self, menu, id): 670 """ 671 Set selected_plottable from context menu selection 672 673 :param menu: context menu item 674 :param id: menu item id 675 """ 676 if len(self.plots) < 1: 677 return 678 name = menu.GetHelpString(id) 679 for plot in self.plots.values(): 680 if plot.name == name: 681 self.graph.selected_plottable = plot.id 682 break 683 664 684 def linear_plottable_fit(self, plot): 665 685 """ … … 917 937 # reset postion 918 938 self.position = None 939 if self.graph.selected_plottable != None: 940 self.graph.selected_plottable = None 919 941 920 942 self.onContextMenu(event)
Note: See TracChangeset
for help on using the changeset viewer.