diff --git a/private/desktoptoolbox.cpp b/private/desktoptoolbox.cpp index e61058a4d..72c80083d 100644 --- a/private/desktoptoolbox.cpp +++ b/private/desktoptoolbox.cpp @@ -108,6 +108,8 @@ class EmptyGraphicsItem : public QGraphicsItem void setRect(const QRectF &rect) { + if (m_rect == rect) + return; //kDebug() << "setting rect to" << rect; prepareGeometryChange(); m_rect = rect; @@ -510,9 +512,8 @@ void DesktopToolBox::showToolBox() { setFlag(ItemIgnoresTransformations, isToolbar()); - if (showing() && !isToolbar()) { + if (showing() && !isToolbar()) return; - } // put tools 5px from icon edge const int iconWidth = KIconLoader::SizeMedium; @@ -696,7 +697,6 @@ void DesktopToolBox::showToolBox() } } - d->toolBacker->setRect(backerRect); d->toolBacker->show(); diff --git a/private/toolbox.cpp b/private/toolbox.cpp index 1a01e2f97..8d76dc5ae 100644 --- a/private/toolbox.cpp +++ b/private/toolbox.cpp @@ -362,7 +362,7 @@ QTransform ToolBox::viewTransform() const return d->viewTransform; } -void ToolBox::setViewTransform(QTransform transform) +void ToolBox::setViewTransform(const QTransform &transform) { if (transform.isScaling()) { d->toolbar = true; diff --git a/private/toolbox_p.h b/private/toolbox_p.h index 7ae36d184..9c9934365 100644 --- a/private/toolbox_p.h +++ b/private/toolbox_p.h @@ -84,7 +84,7 @@ public: void setIsToolbar(bool toolbar); QTransform viewTransform() const; - void setViewTransform(QTransform transforn); + void setViewTransform(const QTransform &transform); void save(KConfigGroup &cg) const; void load(const KConfigGroup &containmentGroup = KConfigGroup());