From 7830d10905c88283457be65d7cc9a884a17070c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ana=20Cec=C3=ADlia=20Martins?= Date: Mon, 31 Aug 2009 19:06:06 +0000 Subject: [PATCH] now calling addItem when adding an offscreen widget, otherwise it would need to be called outside the function, which is not very intuitive svn path=/trunk/KDE/kdelibs/; revision=1017869 --- corona.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/corona.cpp b/corona.cpp index d6c350b94..9d47604e8 100644 --- a/corona.cpp +++ b/corona.cpp @@ -440,6 +440,10 @@ void Corona::addOffscreenWidget(QGraphicsWidget *widget) widget->setParentItem(0); + if (!widget->scene()) { + addItem(widget); + } + //search for an empty spot in the topleft quadrant of the scene. each 'slot' is QWIDGETSIZE_MAX //x QWIDGETSIZE_MAX, so we're guaranteed to never have to move widgets once they're placed here. int i = 0;