mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-08 07:03:25 -06:00
#1813 Observed data: Remove right click options for observed data
This commit is contained in:
parent
28c86b08d7
commit
4e82aaf502
@ -110,9 +110,12 @@ bool RicCutReferencesToClipboardFeature::isAnyCuttableObjectSelected()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicCutReferencesToClipboardFeature::isCuttingOfObjectSupported(caf::PdmObject* pdmObject)
|
||||
{
|
||||
if (dynamic_cast<RimSummaryCase*>(pdmObject))
|
||||
if (RimSummaryCase* summaryCase = dynamic_cast<RimSummaryCase*>(pdmObject))
|
||||
{
|
||||
return true;
|
||||
if (!summaryCase->isObservedData())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -77,7 +77,7 @@ bool RicCloseSummaryCaseFeature::isCommandEnabled()
|
||||
std::vector<RimSummaryCase*> selection;
|
||||
caf::SelectionManager::instance()->objectsByType(&selection);
|
||||
|
||||
return (selection.size() > 0);
|
||||
return (selection.size() > 0 && !selection[0]->isObservedData());
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -35,9 +35,9 @@ CAF_CMD_SOURCE_INIT(RicCreateSummaryCaseCollectionFeature, "RicCreateSummaryCase
|
||||
bool RicCreateSummaryCaseCollectionFeature::isCommandEnabled()
|
||||
{
|
||||
std::vector<RimSummaryCase*> selection;
|
||||
caf::SelectionManager::instance()->objectsByType(&selection);
|
||||
caf::SelectionManager::instance()->objectsByType(&selection);
|
||||
|
||||
return (selection.size() > 0);
|
||||
return (selection.size() > 0 && !selection[0]->isObservedData());
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -43,7 +43,7 @@ bool RicReloadSummaryCaseFeature::isCommandEnabled()
|
||||
{
|
||||
std::vector<RimSummaryCase*> caseSelection = selectedSummaryCases();
|
||||
|
||||
return (caseSelection.size() > 0);
|
||||
return (caseSelection.size() > 0 && !caseSelection[0]->isObservedData());
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -55,7 +55,9 @@ bool RicPasteSummaryCaseFeature::isCommandEnabled()
|
||||
return false;
|
||||
}
|
||||
|
||||
return RicPasteSummaryCaseFeature::summaryCases().size() > 0;
|
||||
std::vector<caf::PdmPointer<RimSummaryCase> > summaryCases = RicPasteSummaryCaseFeature::summaryCases();
|
||||
|
||||
return (summaryCases.size() > 0 && !summaryCases[0]->isObservedData());
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user