QTfrontend/ui/widget/qpushbuttonwithsound.cpp
changeset 6577 9e49e6a8585b
parent 6572 0d0af531c1c7
child 6584 5bb48450b978
--- a/QTfrontend/ui/widget/qpushbuttonwithsound.cpp	Sun Jan 15 23:54:06 2012 +0100
+++ b/QTfrontend/ui/widget/qpushbuttonwithsound.cpp	Mon Jan 16 00:03:13 2012 +0100
@@ -8,14 +8,15 @@
 #include <gameuiconfig.h>
 
 QPushButtonWithSound::QPushButtonWithSound(QWidget *parent) :
-    QPushButton(parent)
+    QPushButton(parent),
+    isSoundEnabled(true)
 {
     connect(this, SIGNAL(clicked()), this, SLOT(buttonClicked()));
 }
 
 void QPushButtonWithSound::buttonClicked()
 {
-    if (!HWForm::config->isFrontendSoundEnabled())
+    if ( !isSoundEnabled || !HWForm::config->isFrontendSoundEnabled())
         return;
 
     HWDataManager & dataMgr = HWDataManager::instance();