Changeset dd150ef in sasview for src/sas/qtgui/Plotting
- Timestamp:
- Nov 9, 2017 8:45:20 AM (7 years ago)
- Branches:
- 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
- Children:
- 1ba88515
- Parents:
- 53c771e
- git-author:
- Piotr Rozyczko <rozyczko@…> (11/09/17 02:37:22)
- git-committer:
- Piotr Rozyczko <rozyczko@…> (11/09/17 08:45:20)
- Location:
- src/sas/qtgui/Plotting
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Plotting/PlotterBase.py
r53c771e rdd150ef 307 307 painter = QtGui.QPainter(printer) 308 308 # Grab the widget screenshot 309 pmap = QtGui.QPixmap.grabWidget(self) 309 pmap = QtGui.QPixmap(self.size()) 310 self.render(pmap) 310 311 # Create a label with pixmap drawn 311 312 printLabel = QtWidgets.QLabel() … … 321 322 """ 322 323 bmp = QtWidgets.QApplication.clipboard() 323 pixmap = QtGui.QPixmap.grabWidget(self.canvas) 324 pixmap = QtGui.QPixmap(self.canvas.size()) 325 self.canvas.render(pixmap) 324 326 bmp.setPixmap(pixmap) 325 327 -
src/sas/qtgui/Plotting/UnitTesting/PlotterBaseTest.py
r53c771e rdd150ef 91 91 self.assertTrue(self.plotter.toolbar.save_figure.called) 92 92 93 def notestOnImagePrint(self):93 def testOnImagePrint(self): 94 94 ''' test the workspace print ''' 95 95 QtGui.QPainter.end = MagicMock() … … 108 108 self.assertTrue(QtWidgets.QLabel.render.called) 109 109 110 def notestOnClipboardCopy(self):110 def testOnClipboardCopy(self): 111 111 ''' test the workspace screen copy ''' 112 112 QtGui.QClipboard.setPixmap = MagicMock()
Note: See TracChangeset
for help on using the changeset viewer.