Changeset 863ebca in sasview for src/sas/qtgui/Plotting/PlotterBase.py
- Timestamp:
- Sep 20, 2018 7:16:26 AM (6 years ago)
- Branches:
- ESS_GUI, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
- Children:
- 8faac15
- Parents:
- bdfe0be
- git-author:
- Piotr Rozyczko <rozyczko@…> (09/20/18 07:14:40)
- git-committer:
- Piotr Rozyczko <piotrrozyczko@…> (09/20/18 07:16:26)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Plotting/PlotterBase.py
r343d7fd r863ebca 110 110 111 111 self.contextMenu = QtWidgets.QMenu(self) 112 112 self.toolbar = NavigationToolbar(self.canvas, self) 113 layout.addWidget(self.toolbar) 113 114 if not quickplot: 114 115 # Add the toolbar 115 self.toolbar = NavigationToolbar(self.canvas, self) 116 layout.addWidget(self.toolbar) 116 self.toolbar.show() 117 117 # Notify PlotHelper about the new plot 118 118 self.upatePlotHelper() 119 else: 120 self.toolbar.hide() 119 121 120 122 self.setLayout(layout) … … 219 221 self.actionCopyToClipboard = self.contextMenu.addAction("Copy to Clipboard") 220 222 self.contextMenu.addSeparator() 223 self.actionToggleMenu = self.contextMenu.addAction("Toggle Navigation Menu") 224 self.contextMenu.addSeparator() 225 221 226 222 227 # Define the callbacks … … 224 229 self.actionPrintImage.triggered.connect(self.onImagePrint) 225 230 self.actionCopyToClipboard.triggered.connect(self.onClipboardCopy) 231 self.actionToggleMenu.triggered.connect(self.onToggleMenu) 226 232 227 233 def createContextMenu(self): … … 371 377 self.manager.communicator.activeGraphName.emit((current_title, title)) 372 378 379 def onToggleMenu(self): 380 """ 381 Toggle navigation menu visibility in the chart 382 """ 383 if self.toolbar.isVisible(): 384 self.toolbar.hide() 385 else: 386 self.toolbar.show() 387 373 388 def offset_graph(self): 374 389 """
Note: See TracChangeset
for help on using the changeset viewer.