Skip to content

Commit

Permalink
Merge branch 'OPM:dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
magnesj authored Apr 18, 2024
2 parents e7158c5 + 932464e commit 651da92
Show file tree
Hide file tree
Showing 142 changed files with 1,660 additions and 1,061 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/ResInsightWithCache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,6 @@ jobs:
- name: Use CMake
uses: lukka/get-cmake@latest
with:
cmakeVersion: "~3.28.0"

- name: Use MSVC (Windows)
uses: ilammy/msvc-dev-cmd@v1
Expand Down
2 changes: 1 addition & 1 deletion ApplicationExeCode/RiaMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ int main( int argc, char* argv[] )
if ( file.open( QIODevice::WriteOnly | QIODevice::Text ) )
{
QTextStream out( &file );
out << portNumber << endl;
out << portNumber << "\n";
}
file.close();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ auto RiaRftPltCurveDefinition::operator<=>( const RiaRftPltCurveDefinition& othe
{
if ( m_wellName == other.m_wellName )
{
return m_timeStep.toTime_t() <=> other.m_timeStep.toTime_t();
return m_timeStep.toMSecsSinceEpoch() <=> other.m_timeStep.toMSecsSinceEpoch();
}
return m_wellName.toStdString() <=> other.m_wellName.toStdString();
}
Expand Down
3 changes: 1 addition & 2 deletions ApplicationLibCode/Application/RiaStringListSerializer.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
#pragma once

#include <QString>

class QStringList;
#include <QStringList>

//--------------------------------------------------------------------------------------------------
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@

#pragma once

#include <QStringList>

#include <map>
#include <memory>
#include <utility>
#include <vector>

class QString;
class QStringList;

class RimIdenticalGridCaseGroup;
class RimRoffCase;
Expand Down
3 changes: 2 additions & 1 deletion ApplicationLibCode/Application/Tools/RiaSummaryStringTools.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

#pragma once

#include <QStringList>

#include <set>
#include <vector>

Expand All @@ -26,7 +28,6 @@ class RifEclipseSummaryAddress;
class RimSummaryCaseCollection;

class QString;
class QStringList;

//==================================================================================================
//
Expand Down
3 changes: 1 addition & 2 deletions ApplicationLibCode/Application/Tools/RiaSummaryTools.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "RimObservedDataCollection.h"

#include <QString>
#include <QStringList>

#include <vector>

Expand All @@ -38,8 +39,6 @@ class RimObservedDataCollection;
class RimSummaryCurve;
class RimUserDefinedCalculation;

class QStringList;

namespace caf
{
class PdmObject;
Expand Down
4 changes: 2 additions & 2 deletions ApplicationLibCode/Application/Tools/RiaTextStringTools.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
#pragma once

#include <QString>
#include <map>
#include <QStringList>

class QStringList;
#include <map>

//--------------------------------------------------------------------------------------------------
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@
#pragma once

#include <QString>
#include <QStringList>

#include <vector>

class RimEclipseCase;
class RimEclipseView;
class RimWellPath;
class QStringList;

//==================================================================================================
//
Expand Down
2 changes: 2 additions & 0 deletions ApplicationLibCode/Commands/CMakeLists_files.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ set(SOURCE_GROUP_HEADER_FILES
${CMAKE_CURRENT_LIST_DIR}/RicExportSummaryCalculationExpressionsFeature.h
${CMAKE_CURRENT_LIST_DIR}/RicImportSummaryCalculationExpressionsFeature.h
${CMAKE_CURRENT_LIST_DIR}/RicImportWellLogCsvFileFeature.h
${CMAKE_CURRENT_LIST_DIR}/RicNewViewForGridEnsembleFeature.h
)

set(SOURCE_GROUP_SOURCE_FILES
Expand Down Expand Up @@ -191,6 +192,7 @@ set(SOURCE_GROUP_SOURCE_FILES
${CMAKE_CURRENT_LIST_DIR}/RicExportSummaryCalculationExpressionsFeature.cpp
${CMAKE_CURRENT_LIST_DIR}/RicImportSummaryCalculationExpressionsFeature.cpp
${CMAKE_CURRENT_LIST_DIR}/RicImportWellLogCsvFileFeature.cpp
${CMAKE_CURRENT_LIST_DIR}/RicNewViewForGridEnsembleFeature.cpp
)

if(RESINSIGHT_USE_QT_CHARTS)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,15 @@ void RicNewCellIndexFilterFeature::onActionTriggered( bool isChecked )
RimCellFilterCollection* filtColl = colls[0];

// and the case to use
RimCase* sourceCase = filtColl->firstAncestorOrThisOfTypeAsserted<RimCase>();
RimCase* sourceCase = filtColl->firstAncestorOrThisOfTypeAsserted<Rim3dView>()->ownerCase();

RimCellIndexFilter* lastCreatedOrUpdated = filtColl->addNewCellIndexFilter( sourceCase );
if ( lastCreatedOrUpdated )
if ( sourceCase )
{
Riu3DMainWindowTools::selectAsCurrentItem( lastCreatedOrUpdated );
RimCellIndexFilter* lastCreatedOrUpdated = filtColl->addNewCellIndexFilter( sourceCase );
if ( lastCreatedOrUpdated )
{
Riu3DMainWindowTools::selectAsCurrentItem( lastCreatedOrUpdated );
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,13 @@ void RicNewPolygonFilterFeature::onActionTriggered( bool isChecked )
}
}

auto sourceCase = cellFilterCollection->firstAncestorOrThisOfTypeAsserted<RimCase>();

if ( auto lastCreatedOrUpdated = cellFilterCollection->addNewPolygonFilter( sourceCase, polygon ) )
auto sourceCase = cellFilterCollection->firstAncestorOrThisOfTypeAsserted<Rim3dView>()->ownerCase();
if ( sourceCase )
{
Riu3DMainWindowTools::selectAsCurrentItem( lastCreatedOrUpdated );
if ( auto lastCreatedOrUpdated = cellFilterCollection->addNewPolygonFilter( sourceCase, polygon ) )
{
Riu3DMainWindowTools::selectAsCurrentItem( lastCreatedOrUpdated );
}
}
}

Expand All @@ -78,5 +80,5 @@ void RicNewPolygonFilterFeature::onActionTriggered( bool isChecked )
void RicNewPolygonFilterFeature::setupActionLook( QAction* actionToSetup )
{
actionToSetup->setIcon( QIcon( ":/CellFilter_Polygon.png" ) );
actionToSetup->setText( "Create Polygon Filter" );
actionToSetup->setText( "New Polygon Filter" );
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@

#include "RicNewRangeFilterSliceFeature.h"

#include "Rim3dView.h"
#include "RimCase.h"
#include "RimCellFilterCollection.h"
#include "RimCellRangeFilter.h"

#include "Riu3DMainWindowTools.h"

#include "cafCmdExecCommandManager.h"
Expand All @@ -45,13 +47,16 @@ void RicNewRangeFilterSliceFeature::onActionTriggered( bool isChecked )
RimCellFilterCollection* filtColl = colls[0];

// and the case to use
RimCase* sourceCase = filtColl->firstAncestorOrThisOfTypeAsserted<RimCase>();
RimCase* sourceCase = filtColl->firstAncestorOrThisOfTypeAsserted<Rim3dView>()->ownerCase();

int gridIndex = 0;
RimCellFilter* lastCreatedOrUpdated = filtColl->addNewCellRangeFilter( sourceCase, gridIndex, m_sliceDirection );
if ( lastCreatedOrUpdated )
if ( sourceCase )
{
Riu3DMainWindowTools::selectAsCurrentItem( lastCreatedOrUpdated );
int gridIndex = 0;
RimCellFilter* lastCreatedOrUpdated = filtColl->addNewCellRangeFilter( sourceCase, gridIndex, m_sliceDirection );
if ( lastCreatedOrUpdated )
{
Riu3DMainWindowTools::selectAsCurrentItem( lastCreatedOrUpdated );
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@

#include "RicNewUserDefinedFilterFeature.h"

#include "Rim3dView.h"
#include "RimCase.h"
#include "RimCellFilterCollection.h"
#include "RimUserDefinedFilter.h"

#include "Riu3DMainWindowTools.h"

#include "cafSelectionManagerTools.h"
Expand All @@ -41,12 +43,15 @@ void RicNewUserDefinedFilterFeature::onActionTriggered( bool isChecked )
RimCellFilterCollection* filtColl = colls[0];

// and the case to use
RimCase* sourceCase = filtColl->firstAncestorOrThisOfTypeAsserted<RimCase>();
RimCase* sourceCase = filtColl->firstAncestorOrThisOfTypeAsserted<Rim3dView>()->ownerCase();

RimUserDefinedFilter* lastCreatedOrUpdated = filtColl->addNewUserDefinedFilter( sourceCase );
if ( lastCreatedOrUpdated )
if ( sourceCase )
{
Riu3DMainWindowTools::selectAsCurrentItem( lastCreatedOrUpdated );
RimUserDefinedFilter* lastCreatedOrUpdated = filtColl->addNewUserDefinedFilter( sourceCase );
if ( lastCreatedOrUpdated )
{
Riu3DMainWindowTools::selectAsCurrentItem( lastCreatedOrUpdated );
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

#include "RicNewUserDefinedIndexFilterFeature.h"

#include "Rim3dView.h"
#include "RimCase.h"
#include "RimCellFilterCollection.h"
#include "RimUserDefinedIndexFilter.h"
Expand All @@ -42,12 +43,15 @@ void RicNewUserDefinedIndexFilterFeature::onActionTriggered( bool isChecked )
RimCellFilterCollection* filtColl = colls[0];

// and the case to use
RimCase* sourceCase = filtColl->firstAncestorOrThisOfTypeAsserted<RimCase>();
RimCase* sourceCase = filtColl->firstAncestorOrThisOfTypeAsserted<Rim3dView>()->ownerCase();

auto* lastCreatedOrUpdated = filtColl->addNewUserDefinedIndexFilter( sourceCase );
if ( lastCreatedOrUpdated )
if ( sourceCase )
{
Riu3DMainWindowTools::selectAsCurrentItem( lastCreatedOrUpdated );
auto* lastCreatedOrUpdated = filtColl->addNewUserDefinedIndexFilter( sourceCase );
if ( lastCreatedOrUpdated )
{
Riu3DMainWindowTools::selectAsCurrentItem( lastCreatedOrUpdated );
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,10 @@ void RicNewAzimuthDipIntersectionFeatureCmd::redo()
intersection->setName( "Azimuth and Dip" );
intersection->configureForAzimuthLine();

RimCase* rimCase = m_intersectionCollection->firstAncestorOrThisOfTypeAsserted<RimCase>();
cvf::BoundingBox bBox = rimCase->allCellsBoundingBox();
RimCase* rimCase = m_intersectionCollection->firstAncestorOrThisOfTypeAsserted<Rim3dView>()->ownerCase();
if ( !rimCase ) return;

cvf::BoundingBox bBox = rimCase->allCellsBoundingBox();
if ( bBox.isValid() )
{
intersection->setLengthUp( cvf::Math::floor( bBox.extent()[2] / 2 ) );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ set(SOURCE_GROUP_HEADER_FILES
${CMAKE_CURRENT_LIST_DIR}/RicRenameCaseFeature.h
${CMAKE_CURRENT_LIST_DIR}/RicImportRoffCaseFeature.h
${CMAKE_CURRENT_LIST_DIR}/RicAddGridCalculationFeature.h
${CMAKE_CURRENT_LIST_DIR}/RicCreateGridCaseEnsemblesFromFilesFeature.h
)

set(SOURCE_GROUP_SOURCE_FILES
Expand All @@ -46,6 +47,7 @@ set(SOURCE_GROUP_SOURCE_FILES
${CMAKE_CURRENT_LIST_DIR}/RicRenameCaseFeature.cpp
${CMAKE_CURRENT_LIST_DIR}/RicImportRoffCaseFeature.cpp
${CMAKE_CURRENT_LIST_DIR}/RicAddGridCalculationFeature.cpp
${CMAKE_CURRENT_LIST_DIR}/RicCreateGridCaseEnsemblesFromFilesFeature.cpp
)

list(APPEND COMMAND_CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES})
Expand Down
Loading

0 comments on commit 651da92

Please sign in to comment.