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
This commit is contained in:
Aaron J. Seigo 2009-11-06 22:34:22 +00:00
parent ca60a5a6cf
commit 6de1341e1b

View File

@ -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());