Commit 732a0c22 authored by Bernd Gehrmann's avatar Bernd Gehrmann
Browse files

Hide tooltip on windowActivationChange()

svn path=/trunk/kdesdk/cervisia/; revision=163106
parent 212806aa
......@@ -188,6 +188,9 @@ QSize AnnotateView::sizeHint() const
void AnnotateView::contentsMouseMoveEvent(QMouseEvent *e)
{
if (!isActiveWindow())
return;
QPoint vp = contentsToViewport(e->pos());
AnnotateViewItem *item
= static_cast<AnnotateViewItem*>( itemAt(vp) );
......@@ -223,9 +226,17 @@ void AnnotateView::contentsMouseMoveEvent(QMouseEvent *e)
}
void AnnotateView::leaveEvent(QEvent *)
void AnnotateView::windowActivationChange(bool oldActive)
{
hideLabel();
QListView::windowActivationChange(oldActive);
}
void AnnotateView::leaveEvent(QEvent *e)
{
hideLabel();
QListView::leaveEvent(e);
}
#include "annotateview.moc"
......
......@@ -34,7 +34,8 @@ public:
virtual QSize sizeHint() const;
virtual void contentsMouseMoveEvent(QMouseEvent *e);
virtual void leaveEvent(QEvent *);
virtual void windowActivationChange(bool oldActive);
virtual void leaveEvent(QEvent *e);
private slots:
void hideLabel();
......
......@@ -303,6 +303,9 @@ void LogListView::contentsMousePressEvent(QMouseEvent *e)
void LogListView::contentsMouseMoveEvent(QMouseEvent *e)
{
if (!isActiveWindow())
return;
QPoint vp = contentsToViewport(e->pos());
LogListViewItem *item
= static_cast<LogListViewItem*>( itemAt(vp) );
......@@ -355,9 +358,17 @@ void LogListView::contentsMouseMoveEvent(QMouseEvent *e)
}
void LogListView::leaveEvent(QEvent *)
void LogListView::windowActivationChange(bool oldActive)
{
hideLabel();
QListView::windowActivationChange(oldActive);
}
void LogListView::leaveEvent(QEvent *e)
{
hideLabel();
QListView::leaveEvent(e);
}
......
......@@ -48,7 +48,8 @@ signals:
protected:
virtual void contentsMousePressEvent(QMouseEvent *e);
virtual void contentsMouseMoveEvent(QMouseEvent *e);
virtual void leaveEvent(QEvent *);
virtual void windowActivationChange(bool oldActive);
virtual void leaveEvent(QEvent *e);
virtual void keyPressEvent(QKeyEvent *e);
private slots:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment