geometry() isn't up to date at the time that an ItemPositionHasChanged
notification is received, so don't use it in calculating the correct position. Also some other small WoC cleanups. BUG: 161969 svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=812493
This commit is contained in:
parent
bfc47e7c3a
commit
f478ae1ca4
@ -344,16 +344,12 @@ QGraphicsView *Applet::view() const
|
|||||||
|
|
||||||
QRectF Applet::mapFromView(const QGraphicsView *view, const QRect &rect) const
|
QRectF Applet::mapFromView(const QGraphicsView *view, const QRect &rect) const
|
||||||
{
|
{
|
||||||
// TODO: Confirm that adjusted() is needed and is not covering for some
|
return mapFromScene(view->mapToScene(rect)).boundingRect();
|
||||||
// issue elsewhere
|
|
||||||
return mapFromScene(view->mapToScene(rect)).boundingRect().adjusted(0, 0, 1, 1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QRect Applet::mapToView(const QGraphicsView *view, const QRectF &rect) const
|
QRect Applet::mapToView(const QGraphicsView *view, const QRectF &rect) const
|
||||||
{
|
{
|
||||||
// TODO: Confirm that adjusted() is needed and is not covering for some
|
return view->mapFromScene(mapToScene(rect)).boundingRect();
|
||||||
// issue elsewhere
|
|
||||||
return view->mapFromScene(mapToScene(rect)).boundingRect().adjusted(0, 0, -1, -1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QPoint Applet::popupPosition(const QSize &s) const
|
QPoint Applet::popupPosition(const QSize &s) const
|
||||||
|
Loading…
Reference in New Issue
Block a user