Changeset 2387abc in sasview for src/sas/sasgui/guiframe/local_perspectives/plotting
- Timestamp:
- Aug 19, 2016 11:02:55 AM (8 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, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 6f343e3
- Parents:
- 32c5983 (diff), 45d7662 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/guiframe/local_perspectives/plotting/Plotter1D.py
ra47d0c8 r2387abc 552 552 self.subplot.set_xlim((xlo, xhi)) 553 553 self.subplot.set_ylim((ylo, yhi)) 554 self.graph.selected_plottable = None 554 555 555 556 … … 629 630 630 631 if self.parent.ClassName.count('wxDialog') == 0: 631 wx_id = ids.next() 632 plot_menu.Append(wx_id, '&Linear Fit', name) 633 wx.EVT_MENU(self, wx_id, self.onFitting) 634 plot_menu.AppendSeparator() 632 if plot.id != 'fit': 633 wx_id = ids.next() 634 plot_menu.Append(wx_id, '&Linear Fit', name) 635 wx.EVT_MENU(self, wx_id, self.onFitting) 636 plot_menu.AppendSeparator() 635 637 636 638 wx_id = ids.next() … … 694 696 self._slicerpop.AppendSeparator() 695 697 wx_id = ids.next() 698 self._slicerpop.Append(wx_id, '&Set Graph Range') 699 wx.EVT_MENU(self, wx_id, self.onSetRange) 700 wx_id = ids.next() 696 701 self._slicerpop.Append(wx_id, '&Reset Graph Range') 697 702 wx.EVT_MENU(self, wx_id, self.onResetGraph) … … 710 715 self.PopupMenu(self._slicerpop, pos) 711 716 717 def onSetRange(self, event): 718 # Display dialog 719 # self.subplot.set_xlim((low, high)) 720 # self.subplot.set_ylim((low, high)) 721 from sas.sasgui.plottools.RangeDialog import RangeDialog 722 d = RangeDialog(self, -1) 723 xlim = self.subplot.get_xlim() 724 ylim = self.subplot.get_ylim() 725 d.SetXRange(xlim) 726 d.SetYRange(ylim) 727 if d.ShowModal() == wx.ID_OK: 728 x_range = d.GetXRange() 729 y_range = d.GetYRange() 730 if x_range is not None and y_range is not None: 731 self.subplot.set_xlim(x_range) 732 self.subplot.set_ylim(y_range) 733 self.subplot.figure.canvas.draw_idle() 734 d.Destroy() 735 712 736 def onFreeze(self, event): 713 737 """ … … 796 820 int(curr_symbol))), curr_label) 797 821 self.appD.Bind(wx.EVT_CLOSE, self.on_AppDialog_close) 822 self.graph.selected_plottable = None 798 823 799 824 def on_AppDialog_close(self, event):
Note: See TracChangeset
for help on using the changeset viewer.