mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-25 06:38:13 -05:00
Show selected realizations using X-cross symbol
This commit is contained in:
1 parent
7ddc789bba
commit
b6b1bf053e
2 files changed
+41
-4
No files matched your search
+28
-4
@@ -31,6 +31,7 @@
|
||||
#include "RimSummaryEnsemble.h"
|
||||
|
||||
#include "RiuContextMenuLauncher.h"
|
||||
#include "RiuDockWidgetTools.h"
|
||||
#include "RiuPlotCurve.h"
|
||||
#include "RiuQwtPlotCurve.h"
|
||||
#include "RiuQwtPlotRectAnnotation.h"
|
||||
@@ -338,6 +339,16 @@ void RimParameterResultCrossPlot::createPoints()
|
||||
|
||||
bool showEnsembleName = ensembles().size() > 1u;
|
||||
|
||||
std::set<RimSummaryCase*> selectedSummaryCases;
|
||||
auto selectedTreeViewItems = RiuDockWidgetTools::selectedItemsInTreeView( RiuDockWidgetTools::plotMainWindowDataSourceTreeName() );
|
||||
for ( auto item : selectedTreeViewItems )
|
||||
{
|
||||
if ( auto summaryCase = dynamic_cast<RimSummaryCase*>( item ) )
|
||||
{
|
||||
selectedSummaryCases.insert( summaryCase );
|
||||
}
|
||||
}
|
||||
|
||||
int idx = 0;
|
||||
auto caseData = createCaseData();
|
||||
for ( const auto& [paramValue, closestValue, summaryCase] : caseData )
|
||||
@@ -346,10 +357,23 @@ void RimParameterResultCrossPlot::createPoints()
|
||||
plotCurve->setSamplesValues( { paramValue }, { closestValue } );
|
||||
plotCurve->setStyle( QwtPlotCurve::NoCurve );
|
||||
|
||||
RiuQwtSymbol* symbol = new RiuQwtSymbol( RiuPlotCurveSymbol::SYMBOL_ELLIPSE );
|
||||
symbol->setSize( legendFontSize(), legendFontSize() );
|
||||
symbol->setColor( colorTable.cycledQColor( idx++ ) );
|
||||
plotCurve->setSymbol( symbol );
|
||||
if ( selectedSummaryCases.contains( summaryCase ) )
|
||||
{
|
||||
RiuQwtSymbol* symbol = new RiuQwtSymbol( RiuPlotCurveSymbol::SYMBOL_XCROSS );
|
||||
auto fontSize = legendFontSize();
|
||||
symbol->setSize( fontSize, fontSize );
|
||||
symbol->setColor( colorTable.cycledQColor( idx++ ) );
|
||||
plotCurve->setSymbol( symbol );
|
||||
}
|
||||
else
|
||||
{
|
||||
RiuQwtSymbol* symbol = new RiuQwtSymbol( RiuPlotCurveSymbol::SYMBOL_ELLIPSE );
|
||||
|
||||
auto fontSize = legendFontSize();
|
||||
symbol->setSize( fontSize, fontSize );
|
||||
symbol->setColor( colorTable.cycledQColor( idx++ ) );
|
||||
plotCurve->setSymbol( symbol );
|
||||
}
|
||||
|
||||
QStringList curveName;
|
||||
if ( showEnsembleName && summaryCase->ensemble() )
|
||||
|
||||
@@ -25,7 +25,10 @@
|
||||
|
||||
#include "RigEnsembleParameter.h"
|
||||
|
||||
#include "RimCorrelationPlotCollection.h"
|
||||
#include "RimEnsembleCurveSet.h"
|
||||
#include "RimMainPlotCollection.h"
|
||||
#include "RimParameterResultCrossPlot.h"
|
||||
#include "RimSummaryCase.h"
|
||||
#include "RimSummaryCurve.h"
|
||||
#include "RimSummaryMultiPlot.h"
|
||||
@@ -438,6 +441,16 @@ void RimSummaryEnsembleTools::highlightCurvesForSummaryCases( const std::vector<
|
||||
plotWidget->replot();
|
||||
}
|
||||
}
|
||||
|
||||
auto plotColl = RimMainPlotCollection::current();
|
||||
if ( auto correlationPlotColl = plotColl->correlationPlotCollection() )
|
||||
{
|
||||
auto crossPlots = correlationPlotColl->descendantsIncludingThisOfType<RimParameterResultCrossPlot>();
|
||||
for ( auto c : crossPlots )
|
||||
{
|
||||
c->loadDataAndUpdate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in new issue
Block a user