summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/widgets/dialogs/qcolordialog.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/widgets/dialogs/qcolordialog.cpp b/src/widgets/dialogs/qcolordialog.cpp
index 5adb4ba6da..7ba8f60f71 100644
--- a/src/widgets/dialogs/qcolordialog.cpp
+++ b/src/widgets/dialogs/qcolordialog.cpp
@@ -1856,15 +1856,12 @@ void QColorDialog::setVisible(bool visible)
}
#else
- if (!(options() & DontUseNativeDialog))
+ if (!(options() & DontUseNativeDialog) && d->nativeDialogInUse) {
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);
} else {
- d->nativeDialogInUse = false;
setAttribute(Qt::WA_DontShowOnScreen, false);
}
#endif