Changeset 0e80658 in sasview


Ignore:
Timestamp:
Nov 9, 2017 2:37:22 AM (7 years ago)
Author:
Piotr Rozyczko <rozyczko@…>
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:
fca1f50
Parents:
3e8dee3
Message:

Fixed printer and clipboard devices

Location:
src/sas/qtgui/Plotting
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/Plotting/PlotterBase.py

    r3e8dee3 r0e80658  
    307307        painter = QtGui.QPainter(printer) 
    308308        # Grab the widget screenshot 
    309         pmap = QtGui.QPixmap.grabWidget(self) 
     309        pmap = QtGui.QPixmap(self.size()) 
     310        self.render(pmap) 
    310311        # Create a label with pixmap drawn 
    311312        printLabel = QtWidgets.QLabel() 
     
    321322        """ 
    322323        bmp = QtWidgets.QApplication.clipboard() 
    323         pixmap = QtGui.QPixmap.grabWidget(self.canvas) 
     324        pixmap = QtGui.QPixmap(self.canvas.size()) 
     325        self.canvas.render(pixmap) 
    324326        bmp.setPixmap(pixmap) 
    325327 
  • src/sas/qtgui/Plotting/UnitTesting/PlotterBaseTest.py

    r3e8dee3 r0e80658  
    9191        self.assertTrue(self.plotter.toolbar.save_figure.called) 
    9292 
    93     def notestOnImagePrint(self): 
     93    def testOnImagePrint(self): 
    9494        ''' test the workspace print ''' 
    9595        QtGui.QPainter.end = MagicMock() 
     
    108108        self.assertTrue(QtWidgets.QLabel.render.called) 
    109109 
    110     def notestOnClipboardCopy(self): 
     110    def testOnClipboardCopy(self): 
    111111        ''' test the workspace screen copy ''' 
    112112        QtGui.QClipboard.setPixmap = MagicMock() 
Note: See TracChangeset for help on using the changeset viewer.