mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-12 08:25:03 -05:00
Merge branch 'main' into dev
This commit is contained in:
commit
ed5382af24
12 files changed
+125
-40
No files matched your search
@@ -705,6 +705,20 @@ RimWellPath* RimWellPlotTools::wellPathByWellPathNameOrSimWellName( const QStrin
|
||||
return wellPath != nullptr ? wellPath : proj->wellPathFromSimWellName( wellPathNameOrSimwellName );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<RimWellPath*> RimWellPlotTools::wellPathsContainingFlow()
|
||||
{
|
||||
std::vector<RimWellPath*> wellPaths;
|
||||
for ( RimWellPath* wellPath : RimProject::current()->allWellPaths() )
|
||||
{
|
||||
if ( wellPath->wellPathGeometry() || RimWellPlotTools::hasFlowData( wellPath ) ) wellPaths.push_back( wellPath );
|
||||
}
|
||||
|
||||
return wellPaths;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -77,6 +77,7 @@ public:
|
||||
|
||||
static std::vector<RimWellLogFile*> wellLogFilesContainingFlow( const QString& wellName );
|
||||
static RimWellPath* wellPathByWellPathNameOrSimWellName( const QString& wellPathNameOrSimwellName );
|
||||
static std::vector<RimWellPath*> wellPathsContainingFlow();
|
||||
|
||||
// RFT Only
|
||||
private:
|
||||
|
||||
@@ -1031,18 +1031,11 @@ void RimWellPltPlot::syncSourcesIoFieldFromGuiField()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPltPlot::calculateValueOptionsForWells( QList<caf::PdmOptionItemInfo>& options )
|
||||
{
|
||||
RimProject* proj = RimProject::current();
|
||||
|
||||
if ( proj != nullptr )
|
||||
auto wellPathsContainingFlowData = RimWellPlotTools::wellPathsContainingFlow();
|
||||
for ( const RimWellPath* const wellPath : wellPathsContainingFlowData )
|
||||
{
|
||||
// Observed wells
|
||||
for ( const RimWellPath* const wellPath : proj->allWellPaths() )
|
||||
{
|
||||
const QString wellName = wellPath->name();
|
||||
|
||||
if ( wellPath->wellPathGeometry() || RimWellPlotTools::hasFlowData( wellPath ) )
|
||||
options.push_back( caf::PdmOptionItemInfo( wellName, wellName ) );
|
||||
}
|
||||
const QString wellName = wellPath->name();
|
||||
options.push_back( caf::PdmOptionItemInfo( wellName, wellName ) );
|
||||
}
|
||||
|
||||
options.push_back( caf::PdmOptionItemInfo( "None", "" ) );
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "RiuViewer.h"
|
||||
#include "RivContourMapProjectionPartMgr.h"
|
||||
|
||||
#include "Polygons/RimPolygonInViewCollection.h"
|
||||
#include "Rim3dOverlayInfoConfig.h"
|
||||
#include "RimAnnotationInViewCollection.h"
|
||||
#include "RimCase.h"
|
||||
@@ -231,9 +232,10 @@ void RimEclipseContourMapView::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiT
|
||||
cellResult()->uiCapability()->setUiReadOnly( m_contourMapProjection->isColumnResult() );
|
||||
uiTreeOrdering.add( wellCollection() );
|
||||
uiTreeOrdering.add( faultCollection() );
|
||||
uiTreeOrdering.add( annotationCollection() );
|
||||
uiTreeOrdering.add( m_cellFilterCollection() );
|
||||
uiTreeOrdering.add( nativePropertyFilterCollection() );
|
||||
uiTreeOrdering.add( m_polygonInViewCollection );
|
||||
uiTreeOrdering.add( annotationCollection() );
|
||||
|
||||
uiTreeOrdering.skipRemainingChildren();
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
|
||||
#include "RiaColorTables.h"
|
||||
#include "RiaColorTools.h"
|
||||
#include "RiaLogging.h"
|
||||
|
||||
#include "RigAllanDiagramData.h"
|
||||
#include "RigCaseCellResultsData.h"
|
||||
@@ -633,12 +634,6 @@ void RimEclipseResultDefinitionTools::updateCellResultLegend( const RimEclipseRe
|
||||
std::iota( uniqueValues.begin(), uniqueValues.end(), 0 );
|
||||
}
|
||||
|
||||
cvf::Color3ubArray legendBaseColors = legendConfigToUpdate->colorLegend()->colorArray();
|
||||
|
||||
cvf::ref<caf::CategoryMapper> categoryMapper = new caf::CategoryMapper;
|
||||
categoryMapper->setCategories( uniqueValues );
|
||||
categoryMapper->setInterpolateColors( legendBaseColors );
|
||||
|
||||
std::vector<int> visibleCategoryValues = uniqueValues;
|
||||
|
||||
if ( resultDefinition->showOnlyVisibleCategoriesInLegend() )
|
||||
@@ -658,6 +653,26 @@ void RimEclipseResultDefinitionTools::updateCellResultLegend( const RimEclipseRe
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const size_t maxCategoryCount = 500;
|
||||
if ( legendConfigToUpdate->mappingMode() == RimRegularLegendConfig::MappingType::CATEGORY_INTEGER &&
|
||||
visibleCategoryValues.size() > maxCategoryCount )
|
||||
{
|
||||
QString txt = QString( "Detected %1 category values. Maximum number of categories is %2. Only the first %2 "
|
||||
"categories will be displayed. Please use a different color mapping." )
|
||||
.arg( visibleCategoryValues.size() )
|
||||
.arg( maxCategoryCount );
|
||||
RiaLogging::error( txt );
|
||||
|
||||
visibleCategoryValues.resize( maxCategoryCount );
|
||||
}
|
||||
|
||||
cvf::Color3ubArray legendBaseColors = legendConfigToUpdate->colorLegend()->colorArray();
|
||||
|
||||
cvf::ref<caf::CategoryMapper> categoryMapper = new caf::CategoryMapper;
|
||||
categoryMapper->setCategories( visibleCategoryValues );
|
||||
categoryMapper->setInterpolateColors( legendBaseColors );
|
||||
|
||||
std::vector<std::tuple<QString, int, cvf::Color3ub>> categoryVector;
|
||||
|
||||
for ( auto value : visibleCategoryValues )
|
||||
|
||||
@@ -651,23 +651,24 @@ std::vector<caf::PdmFieldHandle*> RimSummaryMultiPlot::fieldsToShowInToolbar()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimSummaryMultiPlot::handleGlobalKeyEvent( QKeyEvent* keyEvent )
|
||||
{
|
||||
if ( !RimSummaryPlotControls::handleKeyEvents( m_sourceStepping(), keyEvent ) )
|
||||
bool isHandled = RimSummaryPlotControls::handleKeyEvents( m_sourceStepping(), keyEvent );
|
||||
|
||||
if ( !isHandled && isMouseCursorInsidePlot() )
|
||||
{
|
||||
if ( isMouseCursorInsidePlot() )
|
||||
if ( keyEvent->key() == Qt::Key_PageUp )
|
||||
{
|
||||
if ( keyEvent->key() == Qt::Key_PageUp )
|
||||
{
|
||||
m_viewer->goToPrevPage();
|
||||
return true;
|
||||
}
|
||||
else if ( keyEvent->key() == Qt::Key_PageDown )
|
||||
{
|
||||
m_viewer->goToNextPage();
|
||||
return true;
|
||||
}
|
||||
m_viewer->goToPrevPage();
|
||||
return true;
|
||||
}
|
||||
|
||||
if ( keyEvent->key() == Qt::Key_PageDown )
|
||||
{
|
||||
m_viewer->goToNextPage();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
return isHandled;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -2942,7 +2942,10 @@ void RimWellLogTrack::updateFormationNamesOnPlot()
|
||||
RigEclipseResultAddress( RiaDefines::ResultCatType::FORMATION_NAMES,
|
||||
RiaResultNames::activeFormationNamesResultName() ) );
|
||||
|
||||
curveData = RimWellLogTrack::curveSamplingPointData( eclWellLogExtractor, resultAccessor.p() );
|
||||
if ( resultAccessor.notNull() )
|
||||
{
|
||||
curveData = RimWellLogTrack::curveSamplingPointData( eclWellLogExtractor, resultAccessor.p() );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user