|
|
|
|
@ -2493,18 +2493,18 @@ namespace GraphCanvas
|
|
|
|
|
{
|
|
|
|
|
if (growOnly)
|
|
|
|
|
{
|
|
|
|
|
int left = blockBoundingRect.left();
|
|
|
|
|
int left = static_cast<int>(blockBoundingRect.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())
|
|
|
|
|
{
|
|
|
|
|
right = calculatedBounds.right() + gridStep.GetX();
|
|
|
|
|
right = static_cast<int>(calculatedBounds.right() + gridStep.GetX());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
blockBoundingRect.setX(left);
|
|
|
|
|
@ -2521,18 +2521,18 @@ namespace GraphCanvas
|
|
|
|
|
{
|
|
|
|
|
if (growOnly)
|
|
|
|
|
{
|
|
|
|
|
int top = blockBoundingRect.top();
|
|
|
|
|
int top = static_cast<int>(blockBoundingRect.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())
|
|
|
|
|
{
|
|
|
|
|
bottom = calculatedBounds.bottom() + gridStep.GetY();
|
|
|
|
|
bottom = static_cast<int>(calculatedBounds.bottom() + gridStep.GetY());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
blockBoundingRect.setY(top);
|
|
|
|
|
|