when one of the size hints changes, sync again the graphicswidget and the view

svn path=/trunk/KDE/kdelibs/; revision=1112684
This commit is contained in:
Marco Martin 2010-04-08 20:31:29 +00:00
parent 5d28ad3e73
commit 861c4c18c3

View File

@ -102,6 +102,8 @@ public:
int resizeStartCorner; int resizeStartCorner;
QTimer *moveTimer; QTimer *moveTimer;
QTimer *adjustViewTimer; QTimer *adjustViewTimer;
QSize oldGraphicsWidgetMinimumSize;
QSize oldGraphicsWidgetMaximumSize;
Plasma::AspectRatioMode aspectRatioMode; Plasma::AspectRatioMode aspectRatioMode;
bool resizeChecksWithBorderCheck; bool resizeChecksWithBorderCheck;
}; };
@ -690,8 +692,13 @@ void Dialog::showEvent(QShowEvent * event)
d->updateResizeCorners(); d->updateResizeCorners();
QGraphicsWidget *graphicsWidget = d->graphicsWidgetPtr.data(); QGraphicsWidget *graphicsWidget = d->graphicsWidgetPtr.data();
if (graphicsWidget && d->view && graphicsWidget->size().toSize() != d->view->size()) { if (graphicsWidget &&
((d->view && graphicsWidget->size().toSize() != d->view->size()) ||
d->oldGraphicsWidgetMinimumSize != graphicsWidget->minimumSize() ||
d->oldGraphicsWidgetMaximumSize != graphicsWidget->maximumSize())) {
syncToGraphicsWidget(); syncToGraphicsWidget();
d->oldGraphicsWidgetMinimumSize = graphicsWidget->minimumSize().toSize();
d->oldGraphicsWidgetMaximumSize = graphicsWidget->maximumSize().toSize();
} }
if (d->view) { if (d->view) {