summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2011-11-30 10:56:29 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2011-11-30 10:56:29 +0100
commit094a66765fcb111ede1c1fbd1b540183ff4c130f (patch)
treec7a91fd124408f21ab737ad156ccc3b7b284ffee /client
parent29c58328af0d9ec8fa77253451e8d4801b372db3 (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.
Diffstat (limited to 'client')
-rw-r--r--client/macrowindow.cc6
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;
}
}