Do not set the rectangle if it's the same

Strangelly, this method was being called even if the rectangle was the
same, so we deleted everything and recreated everything again. tsc tsc.

Some more improvement is needed but we are getting there.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2015-01-14 22:36:00 -02:00 committed by Dirk Hohndel
parent 806d984107
commit 3169ec8dc9

View file

@ -57,7 +57,9 @@ void ToolTipItem::clear()
void ToolTipItem::setRect(const QRectF &r)
{
// qDeleteAll(childItems());
if( r == rectangle ) {
return;
}
delete background;
rectangle = r;