|
40 | 40 | #include "RimWellPath.h" |
41 | 41 |
|
42 | 42 | #include "RiuContextMenuLauncher.h" |
| 43 | +#include "RiuDockWidgetTools.h" |
43 | 44 | #include "RiuPlotCurve.h" |
44 | 45 | #include "RiuQwtCurveSelectorFilter.h" |
45 | 46 | #include "RiuQwtPlotCurve.h" |
@@ -675,14 +676,25 @@ void RimParameterRftCrossPlot::createPoints() |
675 | 676 | auto caseData = createCaseData(); |
676 | 677 | if ( caseData.empty() ) return; |
677 | 678 |
|
| 679 | + std::set<RimSummaryCase*> selectedSummaryCases; |
| 680 | + auto selectedTreeViewItems = RiuDockWidgetTools::selectedItemsInTreeView( RiuDockWidgetTools::plotMainWindowDataSourceTreeName() ); |
| 681 | + for ( auto item : selectedTreeViewItems ) |
| 682 | + { |
| 683 | + if ( auto summaryCase = dynamic_cast<RimSummaryCase*>( item ) ) |
| 684 | + { |
| 685 | + selectedSummaryCases.insert( summaryCase ); |
| 686 | + } |
| 687 | + } |
| 688 | + |
678 | 689 | int idx = 0; |
679 | 690 | for ( const auto& [paramValue, pressureValue, summaryCase] : caseData ) |
680 | 691 | { |
681 | 692 | auto* plotCurve = new RiuQwtPlotCurve; |
682 | 693 | plotCurve->setSamplesValues( { paramValue }, { pressureValue } ); |
683 | 694 | plotCurve->setStyle( QwtPlotCurve::NoCurve ); |
684 | 695 |
|
685 | | - auto* symbol = new RiuQwtSymbol( RiuPlotCurveSymbol::SYMBOL_ELLIPSE ); |
| 696 | + const bool isSelected = selectedSummaryCases.contains( summaryCase ); |
| 697 | + auto* symbol = new RiuQwtSymbol( isSelected ? RiuPlotCurveSymbol::SYMBOL_XCROSS : RiuPlotCurveSymbol::SYMBOL_ELLIPSE ); |
686 | 698 | symbol->setSize( 8, 8 ); |
687 | 699 | symbol->setColor( colorTable.cycledQColor( idx++ ) ); |
688 | 700 | plotCurve->setSymbol( symbol ); |
|
0 commit comments