diff --git a/src/gui/kernel/qplatformdialoghelper.cpp b/src/gui/kernel/qplatformdialoghelper.cpp index c36186b815..5890eb4fb6 100644 --- a/src/gui/kernel/qplatformdialoghelper.cpp +++ b/src/gui/kernel/qplatformdialoghelper.cpp @@ -278,7 +278,7 @@ void QColorDialogStaticData::readSettings() void QColorDialogStaticData::writeSettings() const { #ifndef QT_NO_SETTINGS - if (!customSet) { + if (customSet) { QSettings settings(QSettings::UserScope, QStringLiteral("QtProject")); for (int i = 0; i < int(CustomColorCount); ++i) settings.setValue(QLatin1String("Qt/customColors/") + QString::number(i), customRgb[i]);