Remove the unused, unnecessary "position" from several methods and the overlay layout struct

This commit is contained in:
Jacob Støren
2018-04-20 10:13:43 +02:00
parent b102b3025a
commit 1f8d4437bf
9 changed files with 20 additions and 24 deletions

View File

@@ -43,7 +43,7 @@
RivTernarySaturationOverlayItem::RivTernarySaturationOverlayItem(cvf::Font* font)
: TitledOverlayFrame(font, 120, 150)
{
this->computeLayoutAndExtents(cvf::Vec2i(0, 0), this->sizeHint());
this->computeLayoutAndExtents( this->sizeHint());
}
//--------------------------------------------------------------------------------------------------
@@ -57,7 +57,7 @@ RivTernarySaturationOverlayItem::~RivTernarySaturationOverlayItem()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RivTernarySaturationOverlayItem::computeLayoutAndExtents(const cvf::Vec2i& position, const cvf::Vec2ui& size)
void RivTernarySaturationOverlayItem::computeLayoutAndExtents(const cvf::Vec2ui& size)
{
this->setMinimumWidth(size.x());
}

View File

@@ -41,7 +41,7 @@ class RivTernarySaturationOverlayItem : public caf::TitledOverlayFrame
public:
explicit RivTernarySaturationOverlayItem(cvf::Font* font);
~RivTernarySaturationOverlayItem();
virtual void computeLayoutAndExtents(const cvf::Vec2i& position, const cvf::Vec2ui& size) override;
virtual void computeLayoutAndExtents(const cvf::Vec2ui& size) override;
void setRangeText(const cvf::String& soilRange, const cvf::String& sgasRange, const cvf::String& swatRange);

View File

@@ -371,7 +371,7 @@ void RimRegularLegendConfig::updateLegend()
numDecimalDigits -= static_cast<int>(decadesInRange);
}
m_scalarMapperLegend->setTickPrecision(cvf::Math::clamp(numDecimalDigits, 0, 20));
m_scalarMapperLegend->computeLayoutAndExtents(cvf::Vec2i(0, 0), m_scalarMapperLegend->sizeHint());
m_scalarMapperLegend->computeLayoutAndExtents( m_scalarMapperLegend->sizeHint());
RiaApplication* app = RiaApplication::instance();
RiaPreferences* preferences = app->preferences();

View File

@@ -622,7 +622,7 @@ void RiuViewer::addColorLegendToBottomLeftCorner(caf::TitledOverlayFrame* legend
unsigned int requiredLegendWidth = 0u;
for (auto legend : overlayItems)
{
legend->computeLayoutAndExtents(cvf::Vec2i(0, 0), legend->sizeHint());
legend->computeLayoutAndExtents(legend->sizeHint());
requiredLegendWidth = std::max(requiredLegendWidth, legend->minimumWidth());
}