mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-30 17:10:19 -05:00
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:
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 )
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user