Prevent a tooltip from showing after a user has clicked or scrolled on a
widget (until it is re-entered) Also fixed a small whitespace issue. Back-port to 4.1 if so desired. :) svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=837733
This commit is contained in:
parent
bebd1cdc1c
commit
12ec0f5c2b
@ -308,8 +308,8 @@ void ToolTipManagerPrivate::showToolTip()
|
|||||||
bool ToolTipManager::eventFilter(QObject *watched, QEvent *event)
|
bool ToolTipManager::eventFilter(QObject *watched, QEvent *event)
|
||||||
{
|
{
|
||||||
QGraphicsWidget * widget = dynamic_cast<QGraphicsWidget *>(watched);
|
QGraphicsWidget * widget = dynamic_cast<QGraphicsWidget *>(watched);
|
||||||
if (!widget) {
|
if (!widget) {
|
||||||
return QObject::eventFilter(watched,event);
|
return QObject::eventFilter(watched, event);
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (event->type()) {
|
switch (event->type()) {
|
||||||
@ -320,6 +320,13 @@ bool ToolTipManager::eventFilter(QObject *watched, QEvent *event)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Don't restart the show timer on a mouse move event if there hasn't
|
||||||
|
// been an enter event or the current widget has been cleared by a click
|
||||||
|
// or wheel event.
|
||||||
|
if (!d->currentWidget) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case QEvent::GraphicsSceneHoverEnter:
|
case QEvent::GraphicsSceneHoverEnter:
|
||||||
{
|
{
|
||||||
// Check that there is a tooltip to show
|
// Check that there is a tooltip to show
|
||||||
|
Loading…
x
Reference in New Issue
Block a user