Changeset dc51a7f in sasview for sansguiframe/src
- Timestamp:
- Sep 2, 2011 2:54:20 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:
- 37c36d9
- Parents:
- 49ad00b
- Location:
- sansguiframe/src/sans/guiframe/local_perspectives/plotting
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sansguiframe/src/sans/guiframe/local_perspectives/plotting/Plotter1D.py
r7022fdc rdc51a7f 460 460 self._slicerpop.Append(id, '&Reset Graph') 461 461 wx.EVT_MENU(self, id, self.onResetGraph) 462 pos = event.GetPosition() 463 pos = self.ScreenToClient(pos) 462 try: 463 pos_evt = event.GetPosition() 464 pos = self.ScreenToClient(pos_evt) 465 except: 466 pos_x, pos_y = self.toolbar.GetPositionTuple() 467 pos = (pos_x, pos_y + 5) 468 464 469 self.PopupMenu(self._slicerpop, pos) 465 470 466 471 def onFreeze(self, event): 467 472 """ … … 658 663 self.toolbar.Realize() 659 664 wx.EVT_TOOL(self, id_delete, self._on_delete) 660 """ 661 #New toolbar option - adding text to the plot 662 self.toolbar.AddSeparator() 663 id_text = wx.NewId() 664 text = wx.ArtProvider.GetBitmap(wx.ART_PASTE, wx.ART_TOOLBAR) 665 self.toolbar.AddSimpleTool(id_text, text, 666 'Add Text to Plot', 'Adds text to plot') 667 668 self.toolbar.Realize() 669 wx.EVT_TOOL(self, id_text, self._on_addtext) 670 665 666 """ 671 667 self.toolbar.AddSeparator() 672 668 id_text = wx.NewId() -
sansguiframe/src/sans/guiframe/local_perspectives/plotting/Plotter2D.py
r7022fdc rdc51a7f 62 62 add item to the toolbar 63 63 """ 64 #add button 65 id_context = wx.NewId() 66 context_tip = 'Graph Menu' 67 context = wx.ArtProvider.GetBitmap(wx.ART_LIST_VIEW, wx.ART_TOOLBAR) 68 self.InsertSimpleTool(0, id_context, context, 69 context_tip, context_tip) 70 wx.EVT_TOOL(self, id_context, self.parent.onToolContextMenu) 71 self.InsertSeparator(1) 64 72 #add print button 65 73 id_print = wx.NewId() … … 355 363 356 364 id = wx.NewId() 357 slicerpop.Append(id, '&Edit Label', 'EditLabel')365 slicerpop.Append(id, '&Edit Graph Label', 'Edit Graph Label') 358 366 wx.EVT_MENU(self, id, self.onEditLabels) 359 367 slicerpop.AppendSeparator() … … 375 383 slicerpop.Append(id, '&Toggle Linear/Log Scale') 376 384 wx.EVT_MENU(self, id, self._onToggleScale) 377 pos = event.GetPosition() 378 pos = self.ScreenToClient(pos) 385 try: 386 pos_evt = event.GetPosition() 387 pos = self.ScreenToClient(pos_evt) 388 except: 389 pos_x, pos_y = self.toolbar.GetPositionTuple() 390 pos = (pos_x, pos_y + 5) 379 391 self.PopupMenu(slicerpop, pos) 380 392
Note: See TracChangeset
for help on using the changeset viewer.