From 8ebe4e90cd044abbf0b978ae328afbb3fb247eea Mon Sep 17 00:00:00 2001
From: Tobias Hunger <tobias.hunger@nokia.com>
Date: Tue, 16 Mar 2010 10:22:26 +0100
Subject: [PATCH] Fix override color beeing saved

Reviewed-by: jbache
---
 src/plugins/coreplugin/mainwindow.cpp | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/plugins/coreplugin/mainwindow.cpp b/src/plugins/coreplugin/mainwindow.cpp
index 5e7673ea8a9..83f6e1ec2bf 100644
--- a/src/plugins/coreplugin/mainwindow.cpp
+++ b/src/plugins/coreplugin/mainwindow.cpp
@@ -1104,10 +1104,13 @@ void MainWindow::readSettings()
 {
     m_settings->beginGroup(QLatin1String(settingsGroup));
 
-    if (m_overrideColor.isValid())
+    if (m_overrideColor.isValid()) {
         Utils::StyleHelper::setBaseColor(m_overrideColor);
-    else
+        // Get adapted base color.
+        m_overrideColor = Utils::StyleHelper::baseColor();
+    } else {
         Utils::StyleHelper::setBaseColor(m_settings->value(QLatin1String(colorKey)).value<QColor>());
+    }
 
     const QVariant geom = m_settings->value(QLatin1String(geometryKey));
     if (geom.isValid()) {
-- 
GitLab