#4919 Summary Plot : Improve colors of history curve symbols

This commit is contained in:
Magne Sjaastad 2019-11-04 10:15:57 +01:00
parent 5044784201
commit 9ae07c838a
2 changed files with 18 additions and 2 deletions

View File

@ -819,11 +819,15 @@ void RimSummaryCurve::setCurveAppearanceFromCaseType()
if ( prefs->defaultSummaryHistoryCurveStyle() == RiaPreferences::SYMBOLS )
{
m_symbolEdgeColor = m_curveColor;
setSymbol( RiuQwtSymbol::SYMBOL_XCROSS );
setLineStyle( RiuQwtPlotCurve::STYLE_NONE );
}
else if ( prefs->defaultSummaryHistoryCurveStyle() == RiaPreferences::SYMBOLS_AND_LINES )
{
m_symbolEdgeColor = m_curveColor;
setSymbol( RiuQwtSymbol::SYMBOL_XCROSS );
setLineStyle( RiuQwtPlotCurve::STYLE_SOLID );
}

View File

@ -84,7 +84,13 @@ RimSummaryCurveAppearanceCalculator::RimSummaryCurveAppearanceCalculator(
if ( !curveDef.summaryAddress().quantityName().empty() )
{
std::string varname = curveDef.summaryAddress().quantityName();
std::string varname = curveDef.summaryAddress().quantityName();
if ( curveDef.summaryAddress().isHistoryQuantity() )
{
varname = varname.substr( 0, varname.size() - 1 );
}
m_varToAppearanceIdxMap[varname] = -1;
// Indexes for sub color ranges
@ -363,6 +369,12 @@ void RimSummaryCurveAppearanceCalculator::setupCurveLook( RimSummaryCurve* curve
int subColorIndex = -1;
char secondChar = 0;
std::string varname = curve->summaryAddressY().quantityName();
if ( curve->summaryAddressY().isHistoryQuantity() )
{
varname = varname.substr( 0, varname.size() - 1 );
}
if ( varname.size() > 1 )
{
secondChar = varname[1];
@ -527,7 +539,7 @@ RiuQwtSymbol::PointSymbolEnum RimSummaryCurveAppearanceCalculator::cycledSymbol(
int RimSummaryCurveAppearanceCalculator::cycledLineThickness( int index )
{
static const int thicknessCount = 3;
static const int thicknesses[] = {1, 3, 5};
static const int thicknesses[] = { 1, 3, 5 };
if ( index < 0 ) return 1;
return ( thicknesses[( index ) % thicknessCount] );