Summary context menu cleanup and fixes (#9165)

* Make summary plot ctx menu items show up for the plot you right-click on, not the one selected in the project tree.
This commit is contained in:
jonjenssen authored and GitHub committed 2022-08-08 13:34:27 +02:00
1 parent eedebd71a5
commit c3f538c1dd
15 files changed
+296 -58

No files matched your search

@@ -133,6 +133,16 @@ RimSummaryPlot* RicEditSummaryPlotFeature::selectedSummaryPlot()
{
RimSummaryPlot* sumPlot = nullptr;
if ( sender() )
{
QVariant userData = this->userData();
if ( !userData.isNull() && userData.canConvert<void*>() )
{
RimSummaryPlot* plot = static_cast<RimSummaryPlot*>( userData.value<void*>() );
if ( plot ) return plot;
}
}
caf::PdmObject* selObj = dynamic_cast<caf::PdmObject*>( caf::SelectionManager::instance()->selectedItem() );
if ( selObj )
{