ui: Fixed graph node centering shows right end when node has greater width than view

This commit is contained in:
Eberhard Graether
2018-12-05 16:33:51 +01:00
parent 242ba3c2c7
commit 7a0edaec06
+5
View File
@@ -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);
}