Copy changes from dev-branch into main

History of main branch was difficult to merge. Take a copy of dev-branch, and merge both ways between dev and main after the release.
This commit is contained in:
Magne Sjaastad
2023-10-23 08:12:19 +02:00
parent 5688838899
commit 06f9c6126d
1778 changed files with 35036 additions and 12457 deletions

View File

@@ -35,10 +35,10 @@ CAF_CMD_SOURCE_INIT( RicComputeStatisticsFeature, "RicComputeStatisticsFeature"
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RicComputeStatisticsFeature::isCommandEnabled()
bool RicComputeStatisticsFeature::isCommandEnabled() const
{
std::vector<RimEclipseStatisticsCase*> selection = selectedCases();
if ( selection.size() > 0 )
if ( !selection.empty() )
{
RimEclipseStatisticsCase* statisticsCase = selection[0];
if ( statisticsCase )
@@ -46,7 +46,7 @@ bool RicComputeStatisticsFeature::isCommandEnabled()
RimIdenticalGridCaseGroup* gridCaseGroup = statisticsCase->firstAncestorOrThisOfType<RimIdenticalGridCaseGroup>();
RimCaseCollection* caseCollection = gridCaseGroup ? gridCaseGroup->caseCollection() : nullptr;
return caseCollection ? caseCollection->reservoirs.size() > 0 : false;
return caseCollection ? !caseCollection->reservoirs.empty() : false;
}
}
@@ -59,7 +59,7 @@ bool RicComputeStatisticsFeature::isCommandEnabled()
void RicComputeStatisticsFeature::onActionTriggered( bool isChecked )
{
std::vector<RimEclipseStatisticsCase*> selection = selectedCases();
if ( selection.size() > 0 )
if ( !selection.empty() )
{
RimEclipseStatisticsCase* statisticsCase = selection[0];