From 1d7f16296d0e174198fa9fa44a66e31f864482c3 Mon Sep 17 00:00:00 2001 From: Kevin Ottens Date: Mon, 26 Nov 2007 19:44:40 +0000 Subject: [PATCH] Also snaps to the original size. svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=741943 --- applethandle.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/applethandle.cpp b/applethandle.cpp index 8548e0f2b..1b6e072d8 100644 --- a/applethandle.cpp +++ b/applethandle.cpp @@ -277,6 +277,10 @@ void AppletHandle::mouseMoveEvent(QGraphicsSceneMouseEvent *event) m_scale = _k_distanceForPoint(event->pos()-center) / _k_distanceForPoint(pressPos-center); + if (qAbs(m_scale-1.0)<=0.1) { + m_scale = 1.0; + } + QTransform matrix; matrix.translate(center.x(), center.y()); matrix.rotateRadians(m_angle);