Adjustments for release

* Make sure text for multiple wells in same grid cell is displayed correctly
* Improve selection of result in Advanced Snapshot Export
* Restore the main window that was on top when project was saved
* Trim string to make sure '/' is exported with no space in front
* #9872 RFT-plot: Make colors stable for curves in RFT plots
* Set version to RC_02
This commit is contained in:
Magne Sjaastad
2023-03-09 08:54:28 +01:00
committed by GitHub
parent 1d00b38638
commit 527743a845
12 changed files with 107 additions and 33 deletions

View File

@@ -1282,8 +1282,18 @@ cvf::Color3f RimWellRftPlot::findCurveColor( RimWellLogCurve* curve )
}
else
{
RifDataSourceForRftPlt sourceAddress( curveDef.address().ensemble() );
curveColor = m_dataSourceColors[sourceAddress];
if ( curveDef.address().ensemble() )
{
// If we have an ensemble, we need to use the ensemble address to find one single color for all curves in the ensemble. If
// we also include the summary case, each curve will be assigned a separate color.
RifDataSourceForRftPlt dataSource( curveDef.address().ensemble() );
curveColor = m_dataSourceColors[dataSource];
}
else
{
curveColor = m_dataSourceColors[curveDef.address()];
}
}
if ( m_showStatisticsCurves )
@@ -1308,9 +1318,6 @@ cvf::Color3f RimWellRftPlot::findCurveColor( RimWellLogCurve* curve )
//--------------------------------------------------------------------------------------------------
void RimWellRftPlot::defineCurveColorsAndSymbols( const std::set<RiaRftPltCurveDefinition>& allCurveDefs )
{
m_dataSourceColors.clear();
m_timeStepSymbols.clear();
// Clear all ensemble legends
RiuQwtPlotWidget* viewer = nullptr;
RimWellLogTrack* track = dynamic_cast<RimWellLogTrack*>( plotByIndex( 0 ) );
@@ -1368,22 +1375,21 @@ void RimWellRftPlot::defineCurveColorsAndSymbols( const std::set<RiaRftPltCurveD
auto colorTableIndex = m_dataSourceColors.size();
auto symbolTableIndex = m_timeStepSymbols.size();
const RifDataSourceForRftPlt& address = curveDefToAdd.address();
RifDataSourceForRftPlt colorAddress = address;
if ( address.sourceType() == RifDataSourceForRftPlt::SourceType::SUMMARY_RFT )
RifDataSourceForRftPlt address = curveDefToAdd.address();
if ( address.ensemble() )
{
colorAddress = RifDataSourceForRftPlt( address.ensemble() );
// Strip the summary case from the address, so that all curves in the ensemble will get the same color
address = RifDataSourceForRftPlt( address.ensemble() );
}
if ( !m_dataSourceColors.count( colorAddress ) )
if ( !m_dataSourceColors.contains( address ) )
{
colorTableIndex = colorTableIndex % colorTable.size();
m_dataSourceColors[colorAddress] = colorTable[colorTableIndex];
colorTableIndex = colorTableIndex % colorTable.size();
m_dataSourceColors[address] = colorTable[colorTableIndex];
}
if ( address.sourceType() != RifDataSourceForRftPlt::SourceType::ENSEMBLE_RFT )
{
if ( !m_timeStepSymbols.count( curveDefToAdd.timeStep() ) )
if ( !m_timeStepSymbols.contains( curveDefToAdd.timeStep() ) )
{
symbolTableIndex = symbolTableIndex % symbolTable.size();
m_timeStepSymbols[curveDefToAdd.timeStep()] = symbolTable[symbolTableIndex];

View File

@@ -32,6 +32,7 @@
#include "RimTools.h"
#include "cafPdmPointer.h"
#include "cafPdmUiComboBoxEditor.h"
CAF_PDM_SOURCE_INIT( RimAdvancedSnapshotExportDefinition, "MultiSnapshotDefinition" );
@@ -48,7 +49,7 @@ RimAdvancedSnapshotExportDefinition::RimAdvancedSnapshotExportDefinition()
CAF_PDM_InitFieldNoDefault( &view, "View", "View" );
CAF_PDM_InitFieldNoDefault( &eclipseResultType, "EclipseResultType", "Result Type" );
CAF_PDM_InitFieldNoDefault( &selectedEclipseResults, "SelectedEclipseResults", "Properties" );
CAF_PDM_InitFieldNoDefault( &m_selectedEclipseResult, "SelectedEclipseResults", "Properties" );
CAF_PDM_InitField( &timeStepStart, "TimeStepStart", 0, "Start Time" );
CAF_PDM_InitField( &timeStepEnd, "TimeStepEnd", 0, "End Time" );
@@ -71,6 +72,25 @@ RimAdvancedSnapshotExportDefinition::~RimAdvancedSnapshotExportDefinition()
{
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimAdvancedSnapshotExportDefinition::setSelectedEclipseResults( const QString& result )
{
m_selectedEclipseResult = result;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::vector<QString> RimAdvancedSnapshotExportDefinition::selectedEclipseResults() const
{
// The interface here can return a vector of selected results. The user interface in the table is not working well for multi-select of
// strings, so we only allow one result to be selected at a time.
return { m_selectedEclipseResult() };
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -108,9 +128,9 @@ QList<caf::PdmOptionItemInfo> RimAdvancedSnapshotExportDefinition::calculateValu
options.push_back( caf::PdmOptionItemInfo( caf::AppEnum<RiaDefines::ResultCatType>( RiaDefines::ResultCatType::STATIC_NATIVE ).uiText(),
RiaDefines::ResultCatType::STATIC_NATIVE ) );
}
else if ( fieldNeedingOptions == &selectedEclipseResults )
else if ( fieldNeedingOptions == &m_selectedEclipseResult )
{
RimEclipseView* rimEclipseView = dynamic_cast<RimEclipseView*>( view() );
auto* rimEclipseView = dynamic_cast<RimEclipseView*>( view() );
if ( rimEclipseView )
{
QStringList varList;
@@ -161,7 +181,7 @@ void RimAdvancedSnapshotExportDefinition::fieldChangedByUi( const caf::PdmFieldH
{
if ( changedField == &eclipseResultType )
{
selectedEclipseResults.v().clear();
m_selectedEclipseResult.v().clear();
}
else if ( changedField == &sliceDirection )
{
@@ -242,7 +262,7 @@ void RimAdvancedSnapshotExportDefinition::defineUiOrdering( QString uiConfigName
{
view.uiCapability()->setUiReadOnly( true );
eclipseResultType.uiCapability()->setUiReadOnly( true );
selectedEclipseResults.uiCapability()->setUiReadOnly( true );
m_selectedEclipseResult.uiCapability()->setUiReadOnly( true );
timeStepStart.uiCapability()->setUiReadOnly( true );
timeStepEnd.uiCapability()->setUiReadOnly( true );
sliceDirection.uiCapability()->setUiReadOnly( true );
@@ -257,7 +277,7 @@ void RimAdvancedSnapshotExportDefinition::defineUiOrdering( QString uiConfigName
if ( !view() )
{
eclipseResultType.uiCapability()->setUiReadOnly( true );
selectedEclipseResults.uiCapability()->setUiReadOnly( true );
m_selectedEclipseResult.uiCapability()->setUiReadOnly( true );
timeStepStart.uiCapability()->setUiReadOnly( true );
timeStepEnd.uiCapability()->setUiReadOnly( true );
sliceDirection.uiCapability()->setUiReadOnly( true );
@@ -268,7 +288,7 @@ void RimAdvancedSnapshotExportDefinition::defineUiOrdering( QString uiConfigName
else
{
eclipseResultType.uiCapability()->setUiReadOnly( false );
selectedEclipseResults.uiCapability()->setUiReadOnly( false );
m_selectedEclipseResult.uiCapability()->setUiReadOnly( false );
timeStepStart.uiCapability()->setUiReadOnly( false );
timeStepEnd.uiCapability()->setUiReadOnly( false );
sliceDirection.uiCapability()->setUiReadOnly( false );

View File

@@ -41,12 +41,14 @@ public:
RimAdvancedSnapshotExportDefinition();
~RimAdvancedSnapshotExportDefinition() override;
void setSelectedEclipseResults( const QString& result );
std::vector<QString> selectedEclipseResults() const;
caf::PdmField<bool> isActive;
caf::PdmPtrField<Rim3dView*> view;
caf::PdmField<caf::AppEnum<RiaDefines::ResultCatType>> eclipseResultType;
caf::PdmField<std::vector<QString>> selectedEclipseResults;
caf::PdmField<int> timeStepStart;
caf::PdmField<int> timeStepEnd;
@@ -68,4 +70,7 @@ private:
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
QList<caf::PdmOptionItemInfo> toOptionList( const QStringList& varList );
private:
caf::PdmField<QString> m_selectedEclipseResult;
};

View File

@@ -190,6 +190,9 @@ RimProject::RimProject( void )
CAF_PDM_InitField( &m_showPlotWindow, "showPlotWindow", false, "Show Plot Window" );
m_showPlotWindow.uiCapability()->setUiHidden( true );
CAF_PDM_InitField( &m_showPlotWindowOnTopOf3DWindow, "showPlotWindowOnTopOf3DWindow", false, "Show Plot On Top" );
m_showPlotWindowOnTopOf3DWindow.uiCapability()->setUiHidden( true );
CAF_PDM_InitField( &m_subWindowsTiled3DWindow_OBSOLETE, "tiled3DWindow", false, "Tile 3D Window" );
m_subWindowsTiled3DWindow_OBSOLETE.uiCapability()->setUiHidden( true );
@@ -368,6 +371,12 @@ void RimProject::setupBeforeSave()
{
m_show3DWindow = guiApp->isMain3dWindowVisible();
m_showPlotWindow = guiApp->isMainPlotWindowVisible();
if ( m_showPlotWindow )
{
auto plotWindow = RiuPlotMainWindow::instance();
m_showPlotWindowOnTopOf3DWindow = plotWindow->isTopLevel();
}
}
}
@@ -968,6 +977,14 @@ bool RimProject::showPlotWindow() const
return m_showPlotWindow;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RimProject::showPlotWindowOnTop() const
{
return m_showPlotWindowOnTopOf3DWindow();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@@ -155,6 +155,7 @@ public:
bool show3DWindow() const;
bool showPlotWindow() const;
bool showPlotWindowOnTop() const;
RiaDefines::WindowTileMode subWindowsTileMode3DWindow() const;
RiaDefines::WindowTileMode subWindowsTileModePlotWindow() const;
@@ -219,6 +220,7 @@ private:
caf::PdmField<bool> m_show3DWindow;
caf::PdmField<bool> m_showPlotWindow;
caf::PdmField<bool> m_showPlotWindowOnTopOf3DWindow;
caf::PdmField<bool> m_subWindowsTiled3DWindow_OBSOLETE;
caf::PdmField<bool> m_subWindowsTiledPlotWindow_OBSOLETE;