Skip to content

Commit

Permalink
Gui: don't use cached value of color bar width if ratio of the canvas…
Browse files Browse the repository at this point in the history
… is less than 1.0
  • Loading branch information
wwmayer committed Jun 7, 2022
1 parent b448942 commit 80bdc3f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Gui/SoFCColorBar.cpp
Expand Up @@ -87,7 +87,8 @@ void SoFCColorBarBase::setModified()

float SoFCColorBarBase::getBoundingWidth(const SbVec2s& size)
{
if (_boxWidth >= 0.0f) {
float fRatio = static_cast<float>(size[0]) / static_cast<float>(size[1]);
if (fRatio >= 1.0f && _boxWidth >= 0.0f) {
return _boxWidth;
}

Expand Down

0 comments on commit 80bdc3f

Please sign in to comment.