sometimes the tooltip is shown before it take his correct position

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=854008
This commit is contained in:
Alexis Ménard 2008-08-28 17:02:42 +00:00
parent 0df88727ef
commit a32ca528f0
2 changed files with 2 additions and 5 deletions

View File

@ -137,11 +137,6 @@ void ToolTip::prepareShowing()
layout()->activate(); layout()->activate();
resize(sizeHint()); resize(sizeHint());
if (isVisible()) {
d->preview->setInfo();
} else {
show();
}
} }
void ToolTip::resizeEvent(QResizeEvent *e) void ToolTip::resizeEvent(QResizeEvent *e)

View File

@ -301,9 +301,11 @@ void ToolTipManagerPrivate::showToolTip()
ToolTip *tooltip = tooltips.value(currentWidget); ToolTip *tooltip = tooltips.value(currentWidget);
if (tooltip) { if (tooltip) {
tooltip->setVisible(false);
tooltip->prepareShowing(); tooltip->prepareShowing();
tooltip->move(popupPosition(currentWidget, tooltip->size())); tooltip->move(popupPosition(currentWidget, tooltip->size()));
isShown = true; //ToolTip is visible isShown = true; //ToolTip is visible
tooltip->setVisible(true);
} }
} }