mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3687 Fix view updates if creating a brand new contour map, not based on existing view
This commit is contained in:
parent
387741d0c1
commit
c99fb71c36
@ -180,10 +180,6 @@ RimContourMapView* RicNewContourMapViewFeature::create2dContourMap(RimEclipseCas
|
||||
{
|
||||
contourMap->cellResult()->setResultVariable("SOIL");
|
||||
}
|
||||
|
||||
contourMap->hasUserRequestedAnimation = true;
|
||||
contourMap->setBackgroundColor(cvf::Color3f(1.0f, 1.0f, 0.98f));
|
||||
contourMap->initAfterReadRecursively();
|
||||
}
|
||||
|
||||
caf::PdmDocument::updateUiIconStateRecursively(contourMap);
|
||||
@ -192,5 +188,9 @@ RimContourMapView* RicNewContourMapViewFeature::create2dContourMap(RimEclipseCas
|
||||
contourMap->setName(QString("Contour Map %1").arg(i + 1));
|
||||
eclipseCase->contourMapCollection()->push_back(contourMap);
|
||||
|
||||
contourMap->hasUserRequestedAnimation = true;
|
||||
contourMap->setBackgroundColor(cvf::Color3f(1.0f, 1.0f, 0.98f));
|
||||
contourMap->initAfterReadRecursively();
|
||||
|
||||
return contourMap;
|
||||
}
|
||||
|
@ -195,7 +195,9 @@ void RimContourMapProjection::generateVertices(cvf::Vec3fArray* vertices, const
|
||||
RimContourMapProjection::ContourPolygons RimContourMapProjection::generateContourPolygons(const caf::DisplayCoordTransform* displayCoordTransform)
|
||||
{
|
||||
std::vector<cvf::ref<cvf::Vec3fArray>> contourPolygons;
|
||||
if (minValue() != std::numeric_limits<double>::infinity() && maxValue() != -std::numeric_limits<double>::infinity())
|
||||
if (minValue() != std::numeric_limits<double>::infinity() &&
|
||||
maxValue() != -std::numeric_limits<double>::infinity() &&
|
||||
std::fabs(maxValue() - minValue()) > 1.0e-8)
|
||||
{
|
||||
cvf::BoundingBox boundingBox = expandedBoundingBox();
|
||||
|
||||
@ -446,6 +448,10 @@ double RimContourMapProjection::value(uint i, uint j) const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimContourMapProjection::calculateValue(uint i, uint j) const
|
||||
{
|
||||
if (!isColumnResult() && view()->cellResult()->scalarResultIndex() == cvf::UNDEFINED_SIZE_T)
|
||||
{
|
||||
return 0.0; // Special case of NONE-result. Show 0 all over to ensure we see something.
|
||||
}
|
||||
const std::vector<std::pair<size_t, double>>& matchingCells = cellsAtPos2d(i, j);
|
||||
if (!matchingCells.empty())
|
||||
{
|
||||
|
@ -141,6 +141,13 @@ void RimContourMapView::createDisplayModel()
|
||||
{
|
||||
RimEclipseView::createDisplayModel();
|
||||
|
||||
if (!isTimeStepDependentDataVisible())
|
||||
{
|
||||
// RimEclipseView::createDisplayModel() will not draw anything in this case. Draw something anyway.
|
||||
m_viewer->setCurrentFrame(m_currentTimeStep);
|
||||
}
|
||||
|
||||
|
||||
if (this->viewer()->mainCamera()->viewMatrix() == defaultViewMatrix)
|
||||
{
|
||||
this->zoomAll();
|
||||
|
@ -50,7 +50,6 @@ protected:
|
||||
|
||||
caf::PdmFieldHandle* userDescriptionField() override;
|
||||
|
||||
|
||||
virtual std::set<RivCellSetEnum> allVisibleFaultGeometryTypes() const override;
|
||||
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user