mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Whitespace
This commit is contained in:
parent
d208d9104b
commit
5325f1d5fb
@ -111,7 +111,6 @@ void RicCloseCaseFeature::setupActionLook(QAction* actionToSetup)
|
|||||||
actionToSetup->setIcon(QIcon(":/Erase.png"));
|
actionToSetup->setIcon(QIcon(":/Erase.png"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -191,7 +190,8 @@ void RicCloseCaseFeature::deleteEclipseCase(RimEclipseCase* eclipseCase)
|
|||||||
if (resultCase)
|
if (resultCase)
|
||||||
{
|
{
|
||||||
RimProject* project = RiaApplication::instance()->project();
|
RimProject* project = RiaApplication::instance()->project();
|
||||||
RimSummaryCaseMainCollection* sumCaseColl = project->activeOilField() ? project->activeOilField()->summaryCaseMainCollection() : nullptr;
|
RimSummaryCaseMainCollection* sumCaseColl =
|
||||||
|
project->activeOilField() ? project->activeOilField()->summaryCaseMainCollection() : nullptr;
|
||||||
if (sumCaseColl)
|
if (sumCaseColl)
|
||||||
{
|
{
|
||||||
RimSummaryCase* summaryCase = sumCaseColl->findSummaryCaseFromEclipseResultCase(resultCase);
|
RimSummaryCase* summaryCase = sumCaseColl->findSummaryCaseFromEclipseResultCase(resultCase);
|
||||||
@ -253,7 +253,8 @@ bool RicCloseCaseFeature::hasAnyStatisticsResults(RimIdenticalGridCaseGroup* gri
|
|||||||
|
|
||||||
for (size_t i = 0; i < gridCaseGroup->statisticsCaseCollection()->reservoirs().size(); i++)
|
for (size_t i = 0; i < gridCaseGroup->statisticsCaseCollection()->reservoirs().size(); i++)
|
||||||
{
|
{
|
||||||
RimEclipseStatisticsCase* rimStaticsCase = dynamic_cast<RimEclipseStatisticsCase*>(gridCaseGroup->statisticsCaseCollection()->reservoirs[i]);
|
RimEclipseStatisticsCase* rimStaticsCase =
|
||||||
|
dynamic_cast<RimEclipseStatisticsCase*>(gridCaseGroup->statisticsCaseCollection()->reservoirs[i]);
|
||||||
if (rimStaticsCase)
|
if (rimStaticsCase)
|
||||||
{
|
{
|
||||||
if (rimStaticsCase->hasComputedStatistics())
|
if (rimStaticsCase->hasComputedStatistics())
|
||||||
@ -266,7 +267,6 @@ bool RicCloseCaseFeature::hasAnyStatisticsResults(RimIdenticalGridCaseGroup* gri
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -274,10 +274,10 @@ bool RicCloseCaseFeature::userConfirmedGridCaseGroupChange(const std::vector<Rim
|
|||||||
{
|
{
|
||||||
std::vector<RimIdenticalGridCaseGroup*> gridCaseGroups;
|
std::vector<RimIdenticalGridCaseGroup*> gridCaseGroups;
|
||||||
|
|
||||||
for (size_t i = 0; i < casesToBeDeleted.size(); i++)
|
for (auto caseToDelete : casesToBeDeleted)
|
||||||
{
|
{
|
||||||
RimIdenticalGridCaseGroup* gridCaseGroup = nullptr;
|
RimIdenticalGridCaseGroup* gridCaseGroup = nullptr;
|
||||||
casesToBeDeleted[i]->firstAncestorOrThisOfType(gridCaseGroup);
|
caseToDelete->firstAncestorOrThisOfType(gridCaseGroup);
|
||||||
|
|
||||||
if (gridCaseGroup && hasAnyStatisticsResults(gridCaseGroup))
|
if (gridCaseGroup && hasAnyStatisticsResults(gridCaseGroup))
|
||||||
{
|
{
|
||||||
@ -285,7 +285,7 @@ bool RicCloseCaseFeature::userConfirmedGridCaseGroupChange(const std::vector<Rim
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gridCaseGroups.size() > 0)
|
if (!gridCaseGroups.empty())
|
||||||
{
|
{
|
||||||
RiuMainWindow* mainWnd = RiuMainWindow::instance();
|
RiuMainWindow* mainWnd = RiuMainWindow::instance();
|
||||||
|
|
||||||
@ -295,15 +295,16 @@ bool RicCloseCaseFeature::userConfirmedGridCaseGroupChange(const std::vector<Rim
|
|||||||
QString questionText;
|
QString questionText;
|
||||||
if (gridCaseGroups.size() == 1)
|
if (gridCaseGroups.size() == 1)
|
||||||
{
|
{
|
||||||
questionText = QString("This operation will invalidate statistics results in grid case group\n\"%1\".\n").arg(gridCaseGroups[0]->name());
|
questionText = QString("This operation will invalidate statistics results in grid case group\n\"%1\".\n")
|
||||||
|
.arg(gridCaseGroups[0]->name());
|
||||||
questionText += "Computed results in this group will be deleted if you continue.";
|
questionText += "Computed results in this group will be deleted if you continue.";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
questionText = "This operation will invalidate statistics results in grid case groups\n";
|
questionText = "This operation will invalidate statistics results in grid case groups\n";
|
||||||
for (size_t i = 0; i < gridCaseGroups.size(); i++)
|
for (auto& gridCaseGroup : gridCaseGroups)
|
||||||
{
|
{
|
||||||
questionText += QString("\"%1\"\n").arg(gridCaseGroups[i]->name());
|
questionText += QString("\"%1\"\n").arg(gridCaseGroup->name());
|
||||||
}
|
}
|
||||||
|
|
||||||
questionText += "Computed results in these groups will be deleted if you continue.";
|
questionText += "Computed results in these groups will be deleted if you continue.";
|
||||||
|
@ -53,5 +53,3 @@ private:
|
|||||||
static bool hasAnyStatisticsResults(RimIdenticalGridCaseGroup* gridCaseGroup);
|
static bool hasAnyStatisticsResults(RimIdenticalGridCaseGroup* gridCaseGroup);
|
||||||
static void removeCaseFromAllGroups(RimEclipseCase* eclipseCase);
|
static void removeCaseFromAllGroups(RimEclipseCase* eclipseCase);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user