mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#4508 Qt5 : Crash when taking snapshot of MDI window
This commit is contained in:
@@ -870,6 +870,9 @@ bool caf::Viewer::isShadersSupported()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
QImage caf::Viewer::snapshotImage()
|
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;
|
QImage image;
|
||||||
if (m_offscreenFbo.notNull() && m_offscreenViewportWidth > 0 && m_offscreenViewportHeight > 0)
|
if (m_offscreenFbo.notNull() && m_offscreenViewportWidth > 0 && m_offscreenViewportHeight > 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user