From b16e81ebff498f0976e06f6feeaadc9fc88a7848 Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Mon, 16 Aug 2010 18:09:48 +0200 Subject: [PATCH] ControllerRackView: do not loose focus when adding controller For an unknown reason the ControllerRackView looses focus when adding a new controller. Fix this by explicitely calling QWidget::setFocus() at the end of ControllerRackView::addController(). Closes #3046041. (cherry picked from commit 676a6fbad1e8c67f46e7f974e8fe39017616285e) --- src/gui/widgets/ControllerRackView.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gui/widgets/ControllerRackView.cpp b/src/gui/widgets/ControllerRackView.cpp index 2e4cd4e6e..804d7e5db 100644 --- a/src/gui/widgets/ControllerRackView.cpp +++ b/src/gui/widgets/ControllerRackView.cpp @@ -2,6 +2,7 @@ * ControllerRackView.cpp - view for song's controllers * * Copyright (c) 2008-2009 Paul Giblock + * Copyright (c) 2010 Tobias Doerffel * * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net * @@ -22,7 +23,6 @@ * */ - #include #include #include @@ -173,6 +173,10 @@ void ControllerRackView::addController() engine::getSong()->addController( new LfoController( engine::getSong() ) ); update(); + + // fix bug which always made ControllerRackView loose focus when adding + // new controller + setFocus(); }