mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#4919 Summary Plot : Improve colors of history curve symbols
This commit is contained in:
parent
5044784201
commit
9ae07c838a
@ -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 );
|
||||
}
|
||||
|
@ -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] );
|
||||
|
Loading…
Reference in New Issue
Block a user