mirror of
https://github.com/OPM/ResInsight.git
synced 2026-11-05 13:47:06 -06:00
#3793 View auto name. Move ViewNameConfig to 3dView and replace current name field. InitAfterRead update to be backward compatible
This commit is contained in:
1 parent
fa55e1b3f5
commit
295da5658e
17 files changed
+336
-41
No files matched your search
@@ -66,6 +66,7 @@
|
||||
#include "RimViewLinker.h"
|
||||
#include "RimVirtualPerforationResults.h"
|
||||
#include "RimWellPathCollection.h"
|
||||
#include "RimViewNameConfig.h"
|
||||
|
||||
#include "RiuMainWindow.h"
|
||||
#include "Riu3dSelectionManager.h"
|
||||
@@ -168,6 +169,12 @@ RimEclipseView::RimEclipseView()
|
||||
m_reservoirGridPartManager = new RivReservoirViewPartMgr(this);
|
||||
m_simWellsPartManager = new RivReservoirSimWellsPartMgr(this);
|
||||
m_eclipseCase = nullptr;
|
||||
|
||||
nameConfig()->setCustomName("3D View");
|
||||
nameConfig()->hideCaseNameField(false);
|
||||
nameConfig()->hideAggregationTypeField(true);
|
||||
nameConfig()->hidePropertyField(false);
|
||||
nameConfig()->hideSampleSpacingField(true);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -870,6 +877,14 @@ void RimEclipseView::onLoadDataAndUpdate()
|
||||
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
caf::PdmFieldHandle* RimEclipseView::userDescriptionField()
|
||||
{
|
||||
return nameConfig()->nameField();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -954,6 +969,40 @@ cvf::Color4f RimEclipseView::colorFromCellCategory(RivCellSetEnum geometryType)
|
||||
return color;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimEclipseView::createAutoName() const
|
||||
{
|
||||
QStringList autoName;
|
||||
|
||||
if (!nameConfig()->customName().isEmpty())
|
||||
{
|
||||
autoName.push_back(nameConfig()->customName());
|
||||
}
|
||||
|
||||
QStringList generatedAutoTags;
|
||||
|
||||
RimCase* ownerCase = nullptr;
|
||||
this->firstAncestorOrThisOfTypeAsserted(ownerCase);
|
||||
|
||||
if (nameConfig()->addCaseName())
|
||||
{
|
||||
generatedAutoTags.push_back(ownerCase->caseUserDescription());
|
||||
}
|
||||
|
||||
if (nameConfig()->addProperty())
|
||||
{
|
||||
generatedAutoTags.push_back(cellResult()->resultVariable());
|
||||
}
|
||||
|
||||
if (!generatedAutoTags.empty())
|
||||
{
|
||||
autoName.push_back(generatedAutoTags.join(", "));
|
||||
}
|
||||
return autoName.join(": ");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -1516,6 +1565,11 @@ void RimEclipseView::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering&
|
||||
caf::PdmUiGroup* cellGroup = uiOrdering.addNewGroup("Cell Visibility");
|
||||
cellGroup->add(&m_showInactiveCells);
|
||||
cellGroup->add(&m_showInvalidCells);
|
||||
|
||||
caf::PdmUiGroup* nameGroup = uiOrdering.addNewGroup("View Name");
|
||||
nameConfig()->uiOrdering(uiConfigName, *nameGroup);
|
||||
|
||||
uiOrdering.skipRemainingFields(true);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in new issue
Block a user