be a little more forgiving in trying to find the Best View
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=857615
This commit is contained in:
parent
99e664d0c5
commit
fa32b0f2b6
@ -440,15 +440,18 @@ QGraphicsView *Applet::view() const
|
||||
}
|
||||
|
||||
QGraphicsView *found = 0;
|
||||
QGraphicsView *possibleFind = 0;
|
||||
foreach (QGraphicsView *view, scene()->views()) {
|
||||
if (view->sceneRect().intersects(sceneBoundingRect()) ||
|
||||
view->sceneRect().contains(scenePos())) {
|
||||
if (!found || view->isActiveWindow()) {
|
||||
if (view->isActiveWindow()) {
|
||||
found = view;
|
||||
} else {
|
||||
possibleFind = view;
|
||||
}
|
||||
}
|
||||
}
|
||||
return found;
|
||||
return found ? found : possibleFind;
|
||||
}
|
||||
|
||||
QRectF Applet::mapFromView(const QGraphicsView *view, const QRect &rect) const
|
||||
|
Loading…
Reference in New Issue
Block a user