Skip to content

Commit

Permalink
fix #46971: corrupt clipboard in screenshot mode
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcSabatella committed Feb 28, 2015
1 parent a73cb49 commit 29d5e03
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions mscore/fotomode.cpp
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 29d5e03

Please sign in to comment.