Merge pull request #6685 from spycrab/qt_fix_rw

Qt/RenderWidget: Fix the render widget showing up when it shouldn't
This commit is contained in:
Tilka
2018-04-22 12:10:24 +01:00
committed by GitHub

View File

@ -75,9 +75,12 @@ void RenderWidget::OnHideCursorChanged()
void RenderWidget::OnKeepOnTopChanged(bool top) void RenderWidget::OnKeepOnTopChanged(bool top)
{ {
const bool was_visible = isVisible();
setWindowFlags(top ? windowFlags() | Qt::WindowStaysOnTopHint : setWindowFlags(top ? windowFlags() | Qt::WindowStaysOnTopHint :
windowFlags() & ~Qt::WindowStaysOnTopHint); windowFlags() & ~Qt::WindowStaysOnTopHint);
if (was_visible)
show(); show();
} }