From 6de1341e1b0a46c5f9495c8a9a12a403bbfcbcc6 Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Fri, 6 Nov 2009 22:34:22 +0000 Subject: [PATCH] fix resize-after-move, which was seriously annoying me for a while now; thankfully it was an easy fix :) svn path=/trunk/KDE/kdelibs/; revision=1045892 --- private/applethandle.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/private/applethandle.cpp b/private/applethandle.cpp index 9626ea790..5e2dec937 100644 --- a/private/applethandle.cpp +++ b/private/applethandle.cpp @@ -436,7 +436,8 @@ void AppletHandle::mousePressEvent(QGraphicsSceneMouseEvent *event) } if (m_pressedButton == ResizeButton || m_pressedButton == RotateButton) { - m_origAppletCenter = m_applet->geometry().center(); + m_originalGeom = m_applet->geometry(); + m_origAppletCenter = m_originalGeom.center(); m_origAppletSize = QPointF(m_applet->size().width(), m_applet->size().height()); // resize @@ -707,7 +708,7 @@ void AppletHandle::mouseMoveEvent(QGraphicsSceneMouseEvent *event) if (m_pressedButton == ResizeButton) { // set applet size - kDebug() << newCenter << m_originalGeom.topLeft() << newSize; + //kDebug() << newCenter << m_originalGeom.topLeft() << newSize; QPointF newPos = m_originalGeom.topLeft() + _k_rotatePoint(newCenter, m_angle); m_applet->setPos(newPos); // m_applet->moveBy(newCenter.x(), newCenter.y());