diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2011-11-30 10:56:29 +0100 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2011-11-30 10:56:29 +0100 |
commit | 094a66765fcb111ede1c1fbd1b540183ff4c130f (patch) | |
tree | c7a91fd124408f21ab737ad156ccc3b7b284ffee | |
parent | 29c58328af0d9ec8fa77253451e8d4801b372db3 (diff) |
Make sure the drawer button is focused before the macro is deleted. Otherwise something random will gain focus making the scroll area jump to this random position.
-rw-r--r-- | client/macrowindow.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/client/macrowindow.cc b/client/macrowindow.cc index 44f2797..2e0f52a 100644 --- a/client/macrowindow.cc +++ b/client/macrowindow.cc @@ -189,11 +189,13 @@ bool MacroWindow::doCommit() void MacroWindow::commit() { doCommit(); + drawer->setFocus(); } void MacroWindow::cancel() { collapseWrapper(); + drawer->setFocus(); } void MacroWindow::expandWrapper() @@ -271,9 +273,9 @@ void MacroWindow::clear() lua->clear(); if(mainwidget) { - delete mainwidget; - mainwidget = NULL; drawer->setFocus(); + mainwidget->deleteLater(); + mainwidget = NULL; } } |