From e91351d2c22ab041b85f49e243e1f510edf7984e Mon Sep 17 00:00:00 2001 From: sandman Date: Mon, 23 Dec 2002 03:24:31 +0000 Subject: small bugfixes and speedup --- (limited to 'core/settings/button/buttonsettings.cpp') diff --git a/core/settings/button/buttonsettings.cpp b/core/settings/button/buttonsettings.cpp index c71514c..8b0b0a8 100644 --- a/core/settings/button/buttonsettings.cpp +++ b/core/settings/button/buttonsettings.cpp @@ -60,6 +60,7 @@ ButtonSettings::ButtonSettings ( ) : QDialog ( 0, "ButtonSettings", false, WStyle_ContextHelp ) { const QValueList &buttons = ODevice::inst ( )-> buttons ( ); + (void) ButtonUtils::inst ( ); // initialise setCaption ( tr( "Button Settings" )); @@ -133,6 +134,7 @@ ButtonSettings::ButtonSettings ( ) toplay-> addStretch ( 10 ); m_last_button = 0; + m_lock = false; m_timer = new QTimer ( this ); connect ( m_timer, SIGNAL( timeout ( )), this, SLOT( keyTimeout ( ))); @@ -208,6 +210,10 @@ void ButtonSettings::edit ( buttoninfo *bi, bool hold ) { qDebug ( "remap %s for %s", hold ? "hold" : "press", bi-> m_button-> userText ( ). latin1 ( )); + if ( m_lock ) + return; + m_lock = true; + RemapDlg *d = new RemapDlg ( bi-> m_button, hold, this ); d-> showMaximized ( ); @@ -227,6 +233,8 @@ void ButtonSettings::edit ( buttoninfo *bi, bool hold ) } delete d; + + m_lock = false; } void ButtonSettings::accept ( ) -- cgit v0.9.0.2