#6164 Color Legend : Use defines for UI text used multiple times

This commit is contained in:
Magne Sjaastad
2020-06-30 16:34:42 +02:00
parent c56274c3df
commit c3aecaf514
6 changed files with 35 additions and 8 deletions

View File

@@ -17,11 +17,14 @@
/////////////////////////////////////////////////////////////////////////////////
#include "RimColorLegendCollection.h"
#include "RimColorLegend.h"
#include "RimRegularLegendConfig.h"
#include "RiaFractureDefines.h"
#include "RimColorLegend.h"
#include "RimColorLegendItem.h"
#include "RimProject.h"
#include "RimRegularLegendConfig.h"
#include <QString>
CAF_PDM_SOURCE_INIT( RimColorLegendCollection, "ColorLegendCollection" );
@@ -183,7 +186,7 @@ RimColorLegendItem* RimColorLegendCollection::createColorLegendItem( const QStri
RimColorLegend* RimColorLegendCollection::createRockTypeColorLegend() const
{
RimColorLegend* colorLegend = new RimColorLegend;
colorLegend->setColorLegendName( "Rock Types" );
colorLegend->setColorLegendName( RiaDefines::rockTypeColorLegendName() );
// Rock types colors taken from "Equinor GeoStandard - May 2020" document.
// 6.3.1 Epiclastic rocks

View File

@@ -48,6 +48,7 @@
#include "RiuQwtPlotWidget.h"
#include "RiaApplication.h"
#include "RiaFractureDefines.h"
#include "RiaLogging.h"
#include "RiaPreferences.h"
@@ -212,7 +213,7 @@ void RimElasticPropertiesCurve::performDataExtraction( bool* isUsingPseudoLength
fractureModelPlot->getPorosityValues( poroValues );
// TODO: make this settable??
QString colorLegendName = "Facies colors";
QString colorLegendName = RiaDefines::faciesColorLegendName();
RimColorLegend* colorLegend = RimProject::current()->colorLegendCollection()->findByName( colorLegendName );
if ( !colorLegend )
{