Changeset dd150ef in sasview


Ignore:
Timestamp:
Nov 9, 2017 8:45:20 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:
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)
Message:

Fixed printer and clipboard devices

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

Legend:

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

    r53c771e rdd150ef  
    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

    r53c771e rdd150ef  
    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.