From ea1e8d4b93b8423d967719189f915c7333c0ebc4 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Fri, 9 Apr 2010 12:26:01 +0000 Subject: [PATCH] move the dialog on resize only it it waasn't the user resizing it manually svn path=/trunk/KDE/kdelibs/; revision=1112886 --- dialog.cpp | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/dialog.cpp b/dialog.cpp index 5275b4c99..c3c6d9d92 100644 --- a/dialog.cpp +++ b/dialog.cpp @@ -568,16 +568,18 @@ void Dialog::resizeEvent(QResizeEvent *event) d->view->centerOn(graphicsWidget); } - Plasma::Applet *applet = d->applet(); - if (applet && !event->oldSize().isEmpty()) { - Plasma::Corona *corona = qobject_cast(applet->scene()); - if (corona) { - QSize deltaSize(event->size() - event->oldSize()); + if (d->resizeStartCorner == -1) { + Plasma::Applet *applet = d->applet(); + if (applet && !event->oldSize().isEmpty()) { + Plasma::Corona *corona = qobject_cast(applet->scene()); + if (corona) { + QSize deltaSize(event->size() - event->oldSize()); - if (applet->location() == Plasma::BottomEdge) { - move(pos() - QPoint(0, deltaSize.height())); - } else if (applet->location() == Plasma::RightEdge) { - move(pos() - QPoint(deltaSize.width(), 0)); + if (applet->location() == Plasma::BottomEdge) { + move(pos() - QPoint(0, deltaSize.height())); + } else if (applet->location() == Plasma::RightEdge) { + move(pos() - QPoint(deltaSize.width(), 0)); + } } } }