#51 Add preference option to control legend background

This commit is contained in:
Jacob Støren
2018-03-08 16:15:45 +01:00
parent b4935a0534
commit 4d7f753d3c
4 changed files with 14 additions and 0 deletions

View File

@@ -48,6 +48,7 @@
#include <cmath>
#include "RimIntersectionCollection.h"
#include "RiaPreferences.h"
CAF_PDM_SOURCE_INIT(RimLegendConfig, "Legend");
@@ -369,6 +370,10 @@ void RimLegendConfig::updateLegend()
}
m_scalarMapperLegend->setTickPrecision(cvf::Math::clamp(numDecimalDigits, 0, 20));
RiaApplication* app = RiaApplication::instance();
RiaPreferences* preferences = app->preferences();
m_scalarMapperLegend->enableBackground(preferences->showLegendBackground());
m_categoryLegend->enableBackground(preferences->showLegendBackground());
if (m_globalAutoMax != cvf::UNDEFINED_DOUBLE )
{