#4508 Qt5 : Crash when taking snapshot of MDI window

This commit is contained in:
Magne Sjaastad 2019-06-28 13:37:37 +02:00
parent 22e47367ee
commit b70c88330a

View File

@ -870,6 +870,9 @@ bool caf::Viewer::isShadersSupported()
//--------------------------------------------------------------------------------------------------
QImage caf::Viewer::snapshotImage()
{
// Qt5 : Call paintEvent() manually to make sure invisible widgets are rendered properly
// If this call is skipped, we get an assert in cvf::FramebufferObject::bind()
paintEvent(nullptr);
QImage image;
if (m_offscreenFbo.notNull() && m_offscreenViewportWidth > 0 && m_offscreenViewportHeight > 0)