mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3586 Several minor improvements to 2d maps
* disable z-scale * hide some cell and grid appearance groups * disable grid lines on faults
This commit is contained in:
@@ -54,8 +54,7 @@ Rim2dEclipseView::Rim2dEclipseView()
|
||||
m_overlayInfoConfig->setIsActive(false);
|
||||
m_gridCollection->setActive(false); // This is also not added to the tree view, so cannot be enabled.
|
||||
wellCollection()->isActive = false;
|
||||
faultCollection()->showFaultCollection = false;
|
||||
|
||||
faultCollection()->showFaultCollection = false;
|
||||
|
||||
m_grid2dProjectionPartMgr = new Riv2dGridProjectionPartMgr(grid2dProjection());
|
||||
|
||||
@@ -77,6 +76,8 @@ void Rim2dEclipseView::initAfterRead()
|
||||
{
|
||||
m_gridCollection->setActive(false); // This is also not added to the tree view, so cannot be enabled.
|
||||
disablePerspectiveProjectionField();
|
||||
meshMode.setValue(NO_MESH);
|
||||
surfaceMode.setValue(FAULTS);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -92,6 +93,18 @@ void Rim2dEclipseView::createDisplayModel()
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void Rim2dEclipseView::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering)
|
||||
{
|
||||
caf::PdmUiGroup* viewGroup = uiOrdering.addNewGroup("Viewer");
|
||||
viewGroup->add(this->userDescriptionField());
|
||||
viewGroup->add(this->backgroundColorField());
|
||||
viewGroup->add(this->showGridBoxField());
|
||||
uiOrdering.skipRemainingFields(true);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -32,6 +32,7 @@ public:
|
||||
protected:
|
||||
void initAfterRead() override;
|
||||
void createDisplayModel() override;
|
||||
void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
||||
void defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "") override;
|
||||
void updateCurrentTimeStep() override;
|
||||
void updateLegends() override;
|
||||
|
||||
@@ -202,9 +202,12 @@ protected:
|
||||
private:
|
||||
// Overridden PdmObject methods:
|
||||
|
||||
caf::PdmFieldHandle* userDescriptionField() override { return &m_name; }
|
||||
void setupBeforeSave() override;
|
||||
protected:
|
||||
caf::PdmFieldHandle* userDescriptionField() override { return &m_name; }
|
||||
caf::PdmFieldHandle* backgroundColorField() { return &m_backgroundColor; }
|
||||
caf::PdmFieldHandle* showGridBoxField() { return &m_showGridBox; }
|
||||
|
||||
void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
||||
void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
||||
virtual void updateViewWidgetAfterCreation() override;
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include "RigEclipseCaseData.h"
|
||||
#include "RigSimWellData.h"
|
||||
|
||||
#include "Rim2dEclipseView.h"
|
||||
#include "RimEclipseCase.h"
|
||||
#include "RimEclipseResultCase.h"
|
||||
#include "RimEclipseView.h"
|
||||
@@ -530,18 +531,26 @@ void RimSimWellInViewCollection::defineUiOrdering(QString uiConfigName, caf::Pdm
|
||||
{
|
||||
updateStateForVisibilityCheckboxes();
|
||||
|
||||
bool isContourMap = dynamic_cast<const Rim2dEclipseView*>(m_reservoirView) != nullptr;
|
||||
|
||||
caf::PdmUiGroup* appearanceGroup = uiOrdering.addNewGroup("Visibility");
|
||||
appearanceGroup->add(&showWellsIntersectingVisibleCells);
|
||||
if (!isContourMap)
|
||||
{
|
||||
appearanceGroup->add(&showWellsIntersectingVisibleCells);
|
||||
}
|
||||
appearanceGroup->add(&m_showWellLabel);
|
||||
appearanceGroup->add(&m_showWellHead);
|
||||
appearanceGroup->add(&m_showWellPipe);
|
||||
appearanceGroup->add(&m_showWellSpheres);
|
||||
appearanceGroup->add(&m_showWellCommunicationLines);
|
||||
|
||||
caf::PdmUiGroup* filterGroup = uiOrdering.addNewGroup("Well Cells and Fence");
|
||||
filterGroup->add(&m_showWellCells);
|
||||
filterGroup->add(&m_showWellCellFence);
|
||||
filterGroup->add(&wellCellFenceType);
|
||||
if (!isContourMap)
|
||||
{
|
||||
caf::PdmUiGroup* filterGroup = uiOrdering.addNewGroup("Well Cells and Fence");
|
||||
filterGroup->add(&m_showWellCells);
|
||||
filterGroup->add(&m_showWellCellFence);
|
||||
filterGroup->add(&wellCellFenceType);
|
||||
}
|
||||
|
||||
caf::PdmUiGroup* sizeScalingGroup = uiOrdering.addNewGroup("Size Scaling");
|
||||
sizeScalingGroup->add(&wellHeadScaleFactor);
|
||||
@@ -560,10 +569,13 @@ void RimSimWellInViewCollection::defineUiOrdering(QString uiConfigName, caf::Pdm
|
||||
wellPipeGroup->add(&wellPipeCoordType);
|
||||
wellPipeGroup->add(&isAutoDetectingBranches);
|
||||
|
||||
caf::PdmUiGroup* advancedGroup = uiOrdering.addNewGroup("Advanced");
|
||||
advancedGroup->setCollapsedByDefault(true);
|
||||
advancedGroup->add(&wellCellTransparencyLevel);
|
||||
advancedGroup->add(&wellHeadPosition);
|
||||
if (!isContourMap)
|
||||
{
|
||||
caf::PdmUiGroup* advancedGroup = uiOrdering.addNewGroup("Advanced");
|
||||
advancedGroup->setCollapsedByDefault(true);
|
||||
advancedGroup->add(&wellCellTransparencyLevel);
|
||||
advancedGroup->add(&wellHeadPosition);
|
||||
}
|
||||
|
||||
RimEclipseResultCase* ownerCase = nullptr;
|
||||
firstAncestorOrThisOfType(ownerCase);
|
||||
@@ -574,6 +586,8 @@ void RimSimWellInViewCollection::defineUiOrdering(QString uiConfigName, caf::Pdm
|
||||
|
||||
m_showWellCellFence.uiCapability()->setUiReadOnly(!showWellCells());
|
||||
wellCellFenceType.uiCapability()->setUiReadOnly(!showWellCells());
|
||||
|
||||
uiOrdering.skipRemainingFields(true);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -1807,11 +1807,13 @@ void RiuMainWindow::slotScaleChanged(int scaleValue)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuMainWindow::updateScaleValue()
|
||||
{
|
||||
if (RiaApplication::instance()->activeReservoirView())
|
||||
Rim3dView* view = RiaApplication::instance()->activeReservoirView();
|
||||
bool isRegularReservoirView = view && dynamic_cast<Rim2dEclipseView*>(view) == nullptr;
|
||||
if (isRegularReservoirView)
|
||||
{
|
||||
m_scaleFactor->setEnabled(true);
|
||||
|
||||
int scaleValue = static_cast<int>(RiaApplication::instance()->activeReservoirView()->scaleZ()); // Round down is probably ok.
|
||||
int scaleValue = static_cast<int>(view->scaleZ()); // Round down is probably ok.
|
||||
m_scaleFactor->blockSignals(true);
|
||||
m_scaleFactor->setValue(scaleValue);
|
||||
m_scaleFactor->blockSignals(false);
|
||||
|
||||
Reference in New Issue
Block a user