mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Fix bug in QwtPlotWidget highlight reset
QwtPlotShapeItem objects were not reset
This commit is contained in:
parent
057bb73a27
commit
02b1c971e8
@ -1055,7 +1055,7 @@ void RiuQwtPlotWidget::resetPlotItemHighlighting( bool doUpdateCurveOrder )
|
||||
{
|
||||
if ( !m_originalZValues.empty() )
|
||||
{
|
||||
auto plotItemList = m_plot->itemList();
|
||||
const auto& plotItemList = m_plot->itemList();
|
||||
for ( QwtPlotItem* plotItem : plotItemList )
|
||||
{
|
||||
if ( auto* plotCurve = dynamic_cast<QwtPlotCurve*>( plotItem ) )
|
||||
@ -1071,23 +1071,27 @@ void RiuQwtPlotWidget::resetPlotItemHighlighting( bool doUpdateCurveOrder )
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
auto* plotShapeItem = dynamic_cast<QwtPlotShapeItem*>( plotItem );
|
||||
if ( plotShapeItem )
|
||||
{
|
||||
QPen pen = plotShapeItem->pen();
|
||||
|
||||
auto color = RiuGuiTheme::getColorByVariableName( "markerColor" );
|
||||
|
||||
pen.setColor( color );
|
||||
pen.setWidth( 1 );
|
||||
plotShapeItem->setPen( pen );
|
||||
plotShapeItem->setZ( plotShapeItem->z() - 100.0 );
|
||||
}
|
||||
}
|
||||
m_originalZValues.clear();
|
||||
}
|
||||
|
||||
const auto& plotItemList = m_plot->itemList();
|
||||
for ( QwtPlotItem* plotItem : plotItemList )
|
||||
{
|
||||
auto* plotShapeItem = dynamic_cast<QwtPlotShapeItem*>( plotItem );
|
||||
if ( plotShapeItem )
|
||||
{
|
||||
QPen pen = plotShapeItem->pen();
|
||||
|
||||
auto color = RiuGuiTheme::getColorByVariableName( "markerColor" );
|
||||
|
||||
pen.setColor( color );
|
||||
pen.setWidth( 1 );
|
||||
plotShapeItem->setPen( pen );
|
||||
plotShapeItem->setZ( plotShapeItem->z() - 100.0 );
|
||||
}
|
||||
}
|
||||
|
||||
resetPlotAxisHighlighting();
|
||||
|
||||
if ( doUpdateCurveOrder ) updateCurveOrder();
|
||||
|
Loading…
Reference in New Issue
Block a user