force a valid rect in adjustview, otherwise the view will get the whole
scene O.o (this fixes the tooltips not moving issue) svn path=/trunk/KDE/kdelibs/; revision=888074
This commit is contained in:
parent
e06cb3cda0
commit
c0d430de74
10
dialog.cpp
10
dialog.cpp
@ -151,8 +151,14 @@ void DialogPrivate::adjustView()
|
||||
q->updateGeometry();
|
||||
|
||||
//reposition and resize the view.
|
||||
view->setSceneRect(widget->sceneBoundingRect());
|
||||
view->resize(view->mapFromScene(view->sceneRect()).boundingRect().size());
|
||||
//force a valid rect, otherwise it will take up the whole scene
|
||||
QRectF sceneRect(widget->sceneBoundingRect());
|
||||
|
||||
sceneRect.setWidth(qMax(qreal(1), sceneRect.width()));
|
||||
sceneRect.setHeight(qMax(qreal(1), sceneRect.height()));
|
||||
view->setSceneRect(sceneRect);
|
||||
|
||||
view->resize(widget->size().toSize());
|
||||
view->centerOn(widget);
|
||||
|
||||
if (q->size() != prevSize) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user