Diffstat (limited to 'core/settings/button/buttonsettings.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/settings/button/buttonsettings.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
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 ( ) | |||
60 | : QDialog ( 0, "ButtonSettings", false, WStyle_ContextHelp ) | 60 | : QDialog ( 0, "ButtonSettings", false, WStyle_ContextHelp ) |
61 | { | 61 | { |
62 | const QValueList <ODeviceButton> &buttons = ODevice::inst ( )-> buttons ( ); | 62 | const QValueList <ODeviceButton> &buttons = ODevice::inst ( )-> buttons ( ); |
63 | (void) ButtonUtils::inst ( ); // initialise | ||
63 | 64 | ||
64 | setCaption ( tr( "Button Settings" )); | 65 | setCaption ( tr( "Button Settings" )); |
65 | 66 | ||
@@ -133,6 +134,7 @@ ButtonSettings::ButtonSettings ( ) | |||
133 | toplay-> addStretch ( 10 ); | 134 | toplay-> addStretch ( 10 ); |
134 | 135 | ||
135 | m_last_button = 0; | 136 | m_last_button = 0; |
137 | m_lock = false; | ||
136 | 138 | ||
137 | m_timer = new QTimer ( this ); | 139 | m_timer = new QTimer ( this ); |
138 | connect ( m_timer, SIGNAL( timeout ( )), this, SLOT( keyTimeout ( ))); | 140 | connect ( m_timer, SIGNAL( timeout ( )), this, SLOT( keyTimeout ( ))); |
@@ -208,6 +210,10 @@ void ButtonSettings::edit ( buttoninfo *bi, bool hold ) | |||
208 | { | 210 | { |
209 | qDebug ( "remap %s for %s", hold ? "hold" : "press", bi-> m_button-> userText ( ). latin1 ( )); | 211 | qDebug ( "remap %s for %s", hold ? "hold" : "press", bi-> m_button-> userText ( ). latin1 ( )); |
210 | 212 | ||
213 | if ( m_lock ) | ||
214 | return; | ||
215 | m_lock = true; | ||
216 | |||
211 | RemapDlg *d = new RemapDlg ( bi-> m_button, hold, this ); | 217 | RemapDlg *d = new RemapDlg ( bi-> m_button, hold, this ); |
212 | 218 | ||
213 | d-> showMaximized ( ); | 219 | d-> showMaximized ( ); |
@@ -227,6 +233,8 @@ void ButtonSettings::edit ( buttoninfo *bi, bool hold ) | |||
227 | } | 233 | } |
228 | 234 | ||
229 | delete d; | 235 | delete d; |
236 | |||
237 | m_lock = false; | ||
230 | } | 238 | } |
231 | 239 | ||
232 | void ButtonSettings::accept ( ) | 240 | void ButtonSettings::accept ( ) |