Skip to content

Commit

Permalink
Merge pull request #1826 from MarcSabatella/46971-screenshot-corrupt
Browse files Browse the repository at this point in the history
fix #46971: corrupt clipboard in screenshot mode
  • Loading branch information
lasconic committed Feb 28, 2015
2 parents 0480787 + 29d5e03 commit 1d90b26
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions mscore/fotomode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,14 @@ void ScoreView::fotoModeCopy()
printer.fill(transparent ? 0 : 0xffffffff);
QPainter p(&printer);
paintRect(true, p, r, mag);
#if defined(Q_OS_WIN)
// workaround for apparent Qt 5.4 bug; corrupt clipboard when using setImage()
QPixmap px;
px.convertFromImage(printer);
QApplication::clipboard()->setPixmap(px);
#else
QApplication::clipboard()->setImage(printer);
#endif
}

//---------------------------------------------------------
Expand Down

0 comments on commit 1d90b26

Please sign in to comment.