Split summary plot into multiple plots (#8910)

* Support splitting a summary plot with multiple curves into a new multiplot with one plot per curve
* Make sure the correct plot is deleted if using the plot context menu.
This commit is contained in:
jonjenssen
2022-05-13 16:36:30 +02:00
committed by GitHub
parent 6f26f8e462
commit 3b927e1c09
9 changed files with 214 additions and 6 deletions

View File

@@ -193,7 +193,14 @@ void RiuSummaryPlot::showContextMenu( QPoint pos )
}
menuBuilder.addSeparator();
menuBuilder << "RicDeleteSubPlotFeature";
RimSummaryPlot* plot = dynamic_cast<RimSummaryPlot*>( plotWidget()->plotDefinition() );
if ( plot )
{
QVariant plotVariant( QVariant::fromValue( static_cast<void*>( plot ) ) );
menuBuilder.addCmdFeatureWithUserData( "RicSplitMultiPlotFeature", "Split into Multiple Plots", plotVariant );
menuBuilder.addCmdFeatureWithUserData( "RicDeleteSubPlotFeature", "Delete Plot", plotVariant );
}
menuBuilder.appendToMenu( &menu );