mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-28 16:10:24 -05:00
Create a menu for each ensemble in the plot
Create a QVariant using caf::PdmPointer, and send this variant to the feature. The feature converts the QVariant to an ensemble curve set. Make sure the right-click menu in the summary plot shows the Create from filtered cases independent to the selection in project tree.
This commit is contained in:
1 parent
c57eace568
commit
321ff4ad90
3 files changed
+42
-3
No files matched your search
@@ -72,7 +72,16 @@ void RiuSummaryPlot::showContextMenu( QPoint pos )
|
||||
menuBuilder.addSeparator();
|
||||
menuBuilder.addCmdFeatureWithUserData( "RicDeleteSubPlotCtxFeature", "Delete Plot", plotVariant );
|
||||
menuBuilder.addSeparator();
|
||||
menuBuilder.addCmdFeature( "RicCreateEnsembleFromFilteredCasesFeature" );
|
||||
|
||||
for ( auto curveSet : plot->curveSets() )
|
||||
{
|
||||
if ( curveSet->isFiltered() )
|
||||
{
|
||||
auto curveSetVariant = QVariant::fromValue( caf::PdmPointer<RimEnsembleCurveSet>( curveSet ) );
|
||||
auto name = "Create Ensemble from Filtered Cases: " + curveSet->name();
|
||||
menuBuilder.addCmdFeatureWithUserData( "RicCreateEnsembleFromFilteredCasesFeature", name, curveSetVariant );
|
||||
}
|
||||
}
|
||||
}
|
||||
menuBuilder.addSeparator();
|
||||
|
||||
|
||||
Reference in new issue
Block a user