From 094a66765fcb111ede1c1fbd1b540183ff4c130f Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Wed, 30 Nov 2011 10:56:29 +0100 Subject: 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. --- client/macrowindow.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'client') 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; } } -- cgit v1.2.3