ui: Fixed graph node centering shows right end when node has greater width than view
This commit is contained in:
@@ -1187,6 +1187,11 @@ void QtGraphView::centerNode(QtGraphNode* node)
|
||||
rect.setHeight(view->height() - 200);
|
||||
}
|
||||
|
||||
if (rect.width() > view->width() - 200)
|
||||
{
|
||||
rect.setWidth(view->width() - 200);
|
||||
}
|
||||
|
||||
view->ensureVisibleAnimated(rect, 100, 100);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user