diff options
Diffstat (limited to 'src/widgets/dialogs/qfontdialog.cpp')
-rw-r--r-- | src/widgets/dialogs/qfontdialog.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/widgets/dialogs/qfontdialog.cpp b/src/widgets/dialogs/qfontdialog.cpp index b989ea7c86..28afd91a09 100644 --- a/src/widgets/dialogs/qfontdialog.cpp +++ b/src/widgets/dialogs/qfontdialog.cpp @@ -983,14 +983,9 @@ void QFontDialog::setVisible(bool visible) Q_D(QFontDialog); if (d->canBeNativeDialog()) d->setNativeDialogVisible(visible); - if (d->nativeDialogInUse) { - // Set WA_DontShowOnScreen so that QDialog::setVisible(visible) below - // updates the state correctly, but skips showing the non-native version: - setAttribute(Qt::WA_DontShowOnScreen, true); - } else { - d->nativeDialogInUse = false; - setAttribute(Qt::WA_DontShowOnScreen, false); - } + // Set WA_DontShowOnScreen so that QDialog::setVisible(visible) below + // updates the state correctly, but skips showing the non-native version: + setAttribute(Qt::WA_DontShowOnScreen, d->nativeDialogInUse); QDialog::setVisible(visible); } |