QTfrontend/ui/widget/qpushbuttonwithsound.cpp
changeset 6583 4218782d8ca0
parent 6572 0d0af531c1c7
child 6584 5bb48450b978
--- a/QTfrontend/ui/widget/qpushbuttonwithsound.cpp	Tue Jan 17 23:36:15 2012 +0100
+++ b/QTfrontend/ui/widget/qpushbuttonwithsound.cpp	Tue Jan 17 23:42:30 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();