--- a/QTfrontend/ui/mouseoverfilter.cpp Fri Mar 15 11:12:42 2013 +0100
+++ b/QTfrontend/ui/mouseoverfilter.cpp Fri Mar 15 11:55:41 2013 -0400
@@ -22,7 +22,7 @@
bool MouseOverFilter::eventFilter( QObject *dist, QEvent *event )
{
- if (event->type() == QEvent::FocusIn)
+ if (event->type() == QEvent::Enter)
{
QWidget * widget = dynamic_cast<QWidget*>(dist);
@@ -32,6 +32,11 @@
abstractpage->setButtonDescription(widget->whatsThis());
else if (widget->toolTip() != NULL)
abstractpage->setButtonDescription(widget->toolTip());
+ }
+ else if (event->type() == QEvent::FocusIn)
+ {
+ QWidget * widget = dynamic_cast<QWidget*>(dist);
+ abstractpage = qobject_cast<AbstractPage*>(ui->Pages->currentWidget());
// play a sound when mouse hovers certain ui elements
QPushButton * button = dynamic_cast<QPushButton*>(dist);