diff --git a/ApplicationCode/ProjectDataModel/RimPlotCurve.cpp b/ApplicationCode/ProjectDataModel/RimPlotCurve.cpp index 1645919324..f4480dc491 100644 --- a/ApplicationCode/ProjectDataModel/RimPlotCurve.cpp +++ b/ApplicationCode/ProjectDataModel/RimPlotCurve.cpp @@ -494,14 +494,6 @@ void RimPlotCurve::updateLegendsInPlot() } } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimPlotCurve::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) -{ - throw std::logic_error( "The method or operation is not implemented." ); -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -578,7 +570,10 @@ void RimPlotCurve::appearanceUiOrdering( caf::PdmUiOrdering& uiOrdering ) { uiOrdering.add( &m_curveColor ); uiOrdering.add( &m_pointSymbol ); - uiOrdering.add( &m_symbolEdgeColor ); + if ( !RiuQwtSymbol::isFilledSymbol( m_pointSymbol() ) ) + { + uiOrdering.add( &m_symbolEdgeColor ); + } uiOrdering.add( &m_symbolSize ); uiOrdering.add( &m_symbolSkipPixelDistance ); uiOrdering.add( &m_lineStyle ); @@ -672,13 +667,21 @@ void RimPlotCurve::updateCurveAppearance() symbol->setSize( m_symbolSize, m_symbolSize ); symbol->setColor( curveColor ); - QColor symbolEdgeColor( m_symbolEdgeColor.value().rByte(), - m_symbolEdgeColor.value().gByte(), - m_symbolEdgeColor.value().bByte() ); + // If the symbol is a "filled" symbol, we can have a different edge color + // Otherwise we'll have to use the curve color. + if ( RiuQwtSymbol::isFilledSymbol( m_pointSymbol() ) ) + { + QColor symbolEdgeColor( m_symbolEdgeColor.value().rByte(), + m_symbolEdgeColor.value().gByte(), + m_symbolEdgeColor.value().bByte() ); - symbol->setPen( symbolEdgeColor ); + symbol->setPen( symbolEdgeColor ); + } + else + { + symbol->setPen( curveColor ); + } } - m_qwtPlotCurve->setAppearance( m_lineStyle(), m_curveInterpolation(), m_curveThickness(), curveColor ); m_qwtPlotCurve->setSymbol( symbol ); m_qwtPlotCurve->setSymbolSkipPixelDistance( m_symbolSkipPixelDistance() ); diff --git a/ApplicationCode/ProjectDataModel/RimPlotCurve.h b/ApplicationCode/ProjectDataModel/RimPlotCurve.h index 6fb5cf0d96..1df77e9a47 100644 --- a/ApplicationCode/ProjectDataModel/RimPlotCurve.h +++ b/ApplicationCode/ProjectDataModel/RimPlotCurve.h @@ -122,7 +122,6 @@ protected: void updateOptionSensitivity(); void updatePlotTitle(); virtual void updateLegendsInPlot(); - void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override; void setSamplesFromXYErrorValues( const std::vector& xValues, const std::vector& yValues, diff --git a/ApplicationCode/UserInterface/RiuQwtSymbol.cpp b/ApplicationCode/UserInterface/RiuQwtSymbol.cpp index 39cab1b5d1..1e59fb5530 100644 --- a/ApplicationCode/UserInterface/RiuQwtSymbol.cpp +++ b/ApplicationCode/UserInterface/RiuQwtSymbol.cpp @@ -217,6 +217,14 @@ RiuQwtSymbol::PointSymbolEnum RiuQwtSymbol::cycledSymbolStyle( int indexLevel ) return contrastingSymbols[indexLevel % (int)contrastingSymbols.size()]; } +//-------------------------------------------------------------------------------------------------- +/// Is this a symbol with an interior and a border? If false, it is just lines. +//-------------------------------------------------------------------------------------------------- +bool RiuQwtSymbol::isFilledSymbol( PointSymbolEnum symbol ) +{ + return symbol != SYMBOL_NONE && symbol != SYMBOL_CROSS && symbol != SYMBOL_XCROSS && symbol != SYMBOL_STAR1; +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/UserInterface/RiuQwtSymbol.h b/ApplicationCode/UserInterface/RiuQwtSymbol.h index fef336b985..311e59358b 100644 --- a/ApplicationCode/UserInterface/RiuQwtSymbol.h +++ b/ApplicationCode/UserInterface/RiuQwtSymbol.h @@ -72,6 +72,8 @@ public: static PointSymbolEnum cycledSymbolStyle( int indexLevel1, int indexLevel2 ); static PointSymbolEnum cycledSymbolStyle( int indexLevel ); + static bool isFilledSymbol( PointSymbolEnum symbol ); + private: QRect labelBoundingRect( const QPainter* painter, const QRect& symbolRect, const QString& label ) const;