Reverted a rounding change in ComponentGrid as it caused unforeseen issues

This commit is contained in:
Leon Styhre 2023-07-29 20:26:27 +02:00
parent c0ec753dc7
commit 8a42b01165

View file

@ -60,7 +60,7 @@ float ComponentGrid::getRowHeight(int row)
assert(row >= 0 && row < mGridSize.y); assert(row >= 0 && row < mGridSize.y);
if (mRowHeights[row] != 0) if (mRowHeights[row] != 0)
return std::round(mRowHeights[row] * mSize.y); return mRowHeights[row] * mSize.y;
// Calculate automatic height. // Calculate automatic height.
float freeHeightPerc {1.0f}; float freeHeightPerc {1.0f};
@ -71,7 +71,7 @@ float ComponentGrid::getRowHeight(int row)
++between; ++between;
} }
return std::round((freeHeightPerc * mSize.y) / static_cast<float>(between)); return (freeHeightPerc * mSize.y) / static_cast<float>(between);
} }
void ComponentGrid::setColWidthPerc(int col, float width, bool update) void ComponentGrid::setColWidthPerc(int col, float width, bool update)