mirror of
				https://github.com/OPM/ResInsight.git
				synced 2025-02-25 18:55:39 -06:00 
			
		
		
		
	Removed unused function setPosition. Access legendConfig as pointer instead of field
This commit is contained in:
		@@ -107,11 +107,9 @@ RimEclipseView::RimEclipseView()
 | 
			
		||||
    CAF_PDM_InitField(&showInvalidCells,    "ShowInvalidCells",     false,  "Show Invalid Cells",   "", "", "");
 | 
			
		||||
   
 | 
			
		||||
    this->cellResult()->setReservoirView(this);
 | 
			
		||||
    this->cellResult()->legendConfig()->setPosition(cvf::Vec2ui(10, 120));
 | 
			
		||||
 | 
			
		||||
    this->cellEdgeResult()->setReservoirView(this);
 | 
			
		||||
	this->cellEdgeResult()->setReservoirView(this);
 | 
			
		||||
    this->cellEdgeResult()->legendConfig()->setReservoirView(this);
 | 
			
		||||
    this->cellEdgeResult()->legendConfig()->setPosition(cvf::Vec2ui(10, 320));
 | 
			
		||||
    this->cellEdgeResult()->legendConfig()->setColorRangeMode(RimLegendConfig::PINK_WHITE);
 | 
			
		||||
 | 
			
		||||
    this->faultResultSettings()->setReservoirView(this);
 | 
			
		||||
@@ -120,7 +118,6 @@ RimEclipseView::RimEclipseView()
 | 
			
		||||
 | 
			
		||||
    m_pipesPartManager = new RivReservoirPipesPartMgr(this);
 | 
			
		||||
    m_reservoir = NULL;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//--------------------------------------------------------------------------------------------------
 | 
			
		||||
@@ -142,7 +139,6 @@ RimEclipseView::~RimEclipseView()
 | 
			
		||||
    m_reservoir = NULL;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
//--------------------------------------------------------------------------------------------------
 | 
			
		||||
/// 
 | 
			
		||||
//--------------------------------------------------------------------------------------------------
 | 
			
		||||
@@ -957,16 +953,16 @@ void RimEclipseView::updateMinMaxValuesAndAddLegendToView(QString legendLabel, R
 | 
			
		||||
            localNegClosestToZero = globalNegClosestToZero;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        resultColors->legendConfig->setClosestToZeroValues(globalPosClosestToZero, globalNegClosestToZero, localPosClosestToZero, localNegClosestToZero);
 | 
			
		||||
        resultColors->legendConfig->setAutomaticRanges(globalMin, globalMax, localMin, localMax);
 | 
			
		||||
        resultColors->legendConfig()->setClosestToZeroValues(globalPosClosestToZero, globalNegClosestToZero, localPosClosestToZero, localNegClosestToZero);
 | 
			
		||||
        resultColors->legendConfig()->setAutomaticRanges(globalMin, globalMax, localMin, localMax);
 | 
			
		||||
 | 
			
		||||
        m_viewer->addColorLegendToBottomLeftCorner(resultColors->legendConfig->legend());
 | 
			
		||||
        resultColors->legendConfig->legend()->setTitle(cvfqt::Utils::toString(legendLabel + resultColors->resultVariable()));
 | 
			
		||||
        m_viewer->addColorLegendToBottomLeftCorner(resultColors->legendConfig()->legend());
 | 
			
		||||
        resultColors->legendConfig()->legend()->setTitle(cvfqt::Utils::toString(legendLabel + resultColors->resultVariable()));
 | 
			
		||||
    }
 | 
			
		||||
    else
 | 
			
		||||
    {
 | 
			
		||||
        resultColors->legendConfig->setClosestToZeroValues(0, 0, 0, 0);
 | 
			
		||||
        resultColors->legendConfig->setAutomaticRanges(cvf::UNDEFINED_DOUBLE, cvf::UNDEFINED_DOUBLE, cvf::UNDEFINED_DOUBLE, cvf::UNDEFINED_DOUBLE);
 | 
			
		||||
        resultColors->legendConfig()->setClosestToZeroValues(0, 0, 0, 0);
 | 
			
		||||
        resultColors->legendConfig()->setAutomaticRanges(cvf::UNDEFINED_DOUBLE, cvf::UNDEFINED_DOUBLE, cvf::UNDEFINED_DOUBLE, cvf::UNDEFINED_DOUBLE);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    size_t maxTimeStepCount = cellResultsData->maxTimeStepCount();
 | 
			
		||||
@@ -1431,12 +1427,12 @@ RimEclipseCellColors* RimEclipseView::currentFaultResultColors()
 | 
			
		||||
//--------------------------------------------------------------------------------------------------
 | 
			
		||||
void RimEclipseView::resetLegendsInViewer()
 | 
			
		||||
{
 | 
			
		||||
    this->cellResult()->legendConfig->recreateLegend();
 | 
			
		||||
    this->cellResult()->legendConfig()->recreateLegend();
 | 
			
		||||
    this->cellResult()->ternaryLegendConfig->recreateLegend();
 | 
			
		||||
    this->cellEdgeResult()->legendConfig->recreateLegend();
 | 
			
		||||
 | 
			
		||||
    m_viewer->removeAllColorLegends();
 | 
			
		||||
    m_viewer->addColorLegendToBottomLeftCorner(this->cellResult()->legendConfig->legend());
 | 
			
		||||
    m_viewer->addColorLegendToBottomLeftCorner(this->cellResult()->legendConfig()->legend());
 | 
			
		||||
    m_viewer->addColorLegendToBottomLeftCorner(this->cellEdgeResult()->legendConfig->legend());
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -78,7 +78,6 @@ RimGeoMechView::RimGeoMechView(void)
 | 
			
		||||
    propertyFilterCollection->setReservoirView(this);
 | 
			
		||||
 | 
			
		||||
    this->cellResult()->setReservoirView(this);
 | 
			
		||||
    this->cellResult()->legendConfig()->setPosition(cvf::Vec2ui(10, 120));
 | 
			
		||||
    this->cellResult()->legendConfig()->setReservoirView(this);
 | 
			
		||||
 | 
			
		||||
    m_scaleTransform = new cvf::Transform();
 | 
			
		||||
 
 | 
			
		||||
@@ -125,7 +125,6 @@ RimLegendConfig::RimLegendConfig()
 | 
			
		||||
 | 
			
		||||
    cvf::Font* standardFont = RiaApplication::instance()->standardFont();
 | 
			
		||||
    m_legend = new cvf::OverlayScalarMapperLegend(standardFont);
 | 
			
		||||
    m_position = cvf::Vec2ui(20, 50);
 | 
			
		||||
 | 
			
		||||
    updateFieldVisibility();
 | 
			
		||||
    updateLegend();
 | 
			
		||||
@@ -536,14 +535,6 @@ cvf::ref<cvf::Color3ubArray> RimLegendConfig::interpolateColorArray(const cvf::C
 | 
			
		||||
    return colors;
 | 
			
		||||
}
 | 
			
		||||
*/
 | 
			
		||||
//--------------------------------------------------------------------------------------------------
 | 
			
		||||
/// 
 | 
			
		||||
//--------------------------------------------------------------------------------------------------
 | 
			
		||||
void RimLegendConfig::setPosition(cvf::Vec2ui position)
 | 
			
		||||
{
 | 
			
		||||
    m_position = position;
 | 
			
		||||
    updateLegend();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//--------------------------------------------------------------------------------------------------
 | 
			
		||||
/// 
 | 
			
		||||
 
 | 
			
		||||
@@ -93,7 +93,6 @@ public:
 | 
			
		||||
    void                                        setColorRangeMode(ColorRangesType colorMode);
 | 
			
		||||
    void                                        setAutomaticRanges(double globalMin, double globalMax, double localMin, double localMax);
 | 
			
		||||
    void                                        setClosestToZeroValues(double globalPosClosestToZero, double globalNegClosestToZero, double localPosClosestToZero, double localNegClosestToZero);
 | 
			
		||||
    void                                        setPosition(cvf::Vec2ui position);
 | 
			
		||||
 | 
			
		||||
    cvf::ScalarMapper*                          scalarMapper() { return m_currentScalarMapper.p(); }
 | 
			
		||||
    cvf::OverlayScalarMapperLegend*             legend() { return m_legend.p(); }
 | 
			
		||||
@@ -131,8 +130,6 @@ private:
 | 
			
		||||
    double                                      m_localAutoPosClosestToZero;
 | 
			
		||||
    double                                      m_localAutoNegClosestToZero;
 | 
			
		||||
 | 
			
		||||
    cvf::Vec2ui                                 m_position;
 | 
			
		||||
 | 
			
		||||
    // Fields
 | 
			
		||||
    caf::PdmField<int>                          m_numLevels;
 | 
			
		||||
    caf::PdmField<int>                          m_precision;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user