QTfrontend/ui/mouseoverfilter.cpp
changeset 8729 b19be476a2fa
parent 8326 023a71940f26
child 8732 57c10f640b60
--- a/QTfrontend/ui/mouseoverfilter.cpp	Tue Mar 12 22:20:42 2013 -0400
+++ b/QTfrontend/ui/mouseoverfilter.cpp	Tue Mar 12 22:35:57 2013 -0400
@@ -5,6 +5,7 @@
 #include <QLabel>
 #include <QLineEdit>
 #include <QCheckBox>
+#include <QListView>
 
 #include "mouseoverfilter.h"
 #include "ui/page/AbstractPage.h"
@@ -21,7 +22,7 @@
 
 bool MouseOverFilter::eventFilter( QObject *dist, QEvent *event )
 {
-    if (event->type() == QEvent::Enter)
+    if (event->type() == QEvent::FocusIn)
     {
         QWidget * widget = dynamic_cast<QWidget*>(dist);
 
@@ -39,7 +40,8 @@
         QComboBox * droplist = dynamic_cast<QComboBox*>(dist);
         QSlider * slider = dynamic_cast<QSlider*>(dist);
         QTabWidget * tab = dynamic_cast<QTabWidget*>(dist);
-        if (button || textfield || checkbox || droplist || slider || tab)
+        QListView * listview = dynamic_cast<QListView*>(dist);
+        if (button || textfield || checkbox || droplist || slider || tab || listview)
         {
             SDLInteraction::instance().playSoundFile("/Sounds/steps.ogg");
         }
@@ -50,9 +52,9 @@
     {
         abstractpage = qobject_cast<AbstractPage*>(ui->Pages->currentWidget());
 
-        if (abstractpage->getDefautDescription() != NULL)
+        if (abstractpage->getDefaultDescription() != NULL)
         {
-            abstractpage->setButtonDescription( * abstractpage->getDefautDescription());
+            abstractpage->setButtonDescription( * abstractpage->getDefaultDescription());
         }
         else
             abstractpage->setButtonDescription("");