Commit 7ef3ebdf authored by Mike Kremer's avatar Mike Kremer
Browse files

fix: "application screenshot" copies the viewer content into the main window screenshot

refs #943

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@14925 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 631d84e9
......@@ -430,8 +430,27 @@ void CoreWidget::applicationSnapshotDialog() {
}else
snapshotCounter_++;
//grabs only the widget (espacially in windows)
//todo: deprecated in QT 5.0, use QScreen instead
QPixmap pic = QPixmap::grabWindow( winId() );
QPainter painter (&pic);
//so we have to add the content from the GLContext manually
for (std::vector< glViewer* >::iterator iter = examiner_widgets_.begin(); iter != examiner_widgets_.end(); ++iter)
{
if (*iter)
{
QImage fillImage;
(*iter)->snapshot(fillImage, (*iter)->glWidth() , (*iter)->glHeight());
QPoint localPos = QPoint((*iter)->pos().x(),(*iter)->pos().y());
QPointF pos = glView_->mapTo(this,localPos);
painter.drawImage(pos,fillImage);
}
}
pic.save(newName);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment