mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-21 22:13:25 -06:00
Fix crash when opening context menu with multiple selected views.
This commit is contained in:
parent
d15b2e5196
commit
4900f50160
@ -42,6 +42,11 @@ bool RicPasteTimeHistoryCurveFeature::isCommandEnabled()
|
||||
{
|
||||
caf::PdmObjectHandle* destinationObject = dynamic_cast<caf::PdmObjectHandle*>(caf::SelectionManager::instance()->selectedItem());
|
||||
|
||||
if (!destinationObject)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
RimSummaryPlot* summaryPlot = nullptr;
|
||||
destinationObject->firstAncestorOrThisOfType(summaryPlot);
|
||||
if (!summaryPlot)
|
||||
@ -58,6 +63,7 @@ bool RicPasteTimeHistoryCurveFeature::isCommandEnabled()
|
||||
void RicPasteTimeHistoryCurveFeature::onActionTriggered(bool isChecked)
|
||||
{
|
||||
caf::PdmObjectHandle* destinationObject = dynamic_cast<caf::PdmObjectHandle*>(caf::SelectionManager::instance()->selectedItem());
|
||||
CVF_ASSERT(destinationObject);
|
||||
|
||||
RimSummaryPlot* summaryPlot = nullptr;
|
||||
destinationObject->firstAncestorOrThisOfType(summaryPlot);
|
||||
|
Loading…
Reference in New Issue
Block a user