GraphCanvas

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
pappeste
2021-06-25 16:34:20 -07:00
committed by Esteban Papp
parent 48fcd462c6
commit 4ee9adf522
@@ -2493,18 +2493,18 @@ namespace GraphCanvas
{ {
if (growOnly) if (growOnly)
{ {
int left = blockBoundingRect.left(); int left = static_cast<int>(blockBoundingRect.left());
if (left >= calculatedBounds.left()) if (left >= calculatedBounds.left())
{ {
left = calculatedBounds.left() - gridStep.GetX(); left = static_cast<int>(calculatedBounds.left() - gridStep.GetX());
} }
int right = blockBoundingRect.right(); int right = static_cast<int>(blockBoundingRect.right());
if (right <= calculatedBounds.right()) if (right <= calculatedBounds.right())
{ {
right = calculatedBounds.right() + gridStep.GetX(); right = static_cast<int>(calculatedBounds.right() + gridStep.GetX());
} }
blockBoundingRect.setX(left); blockBoundingRect.setX(left);
@@ -2521,18 +2521,18 @@ namespace GraphCanvas
{ {
if (growOnly) if (growOnly)
{ {
int top = blockBoundingRect.top(); int top = static_cast<int>(blockBoundingRect.top());
if (top >= calculatedBounds.top()) if (top >= calculatedBounds.top())
{ {
top = calculatedBounds.top() - gridStep.GetY(); top = static_cast<int>(calculatedBounds.top() - gridStep.GetY());
} }
int bottom = blockBoundingRect.bottom(); int bottom = static_cast<int>(blockBoundingRect.bottom());
if (bottom <= calculatedBounds.bottom()) if (bottom <= calculatedBounds.bottom())
{ {
bottom = calculatedBounds.bottom() + gridStep.GetY(); bottom = static_cast<int>(calculatedBounds.bottom() + gridStep.GetY());
} }
blockBoundingRect.setY(top); blockBoundingRect.setY(top);