From 54b5044db4a632a569c20d0ec98bc71a5e14a67d 2012-04-24 13:23:48 From: Jani Honkonen Date: 2012-04-24 13:23:48 Subject: [PATCH] Bugfix: Adding/removing slices erased users colors. Setting a theme left the "force" state on. This should also effect the bar chart. --- diff --git a/src/chartpresenter.cpp b/src/chartpresenter.cpp index d32505f..ac3155d 100644 --- a/src/chartpresenter.cpp +++ b/src/chartpresenter.cpp @@ -185,6 +185,11 @@ void ChartPresenter::setTheme(QChart::ChartTheme theme,bool force) m_chartTheme->decorate(m_chart); m_chartTheme->decorate(m_chart->legend()); resetAllElements(); + + // We do not want "force" to stay on. + // Bar/pie are calling decorate when adding/removing slices/bars which means + // that to preserve users colors "force" must not be on. + m_chartTheme->setForced(false); } QChart::ChartTheme ChartPresenter::theme()