From dfa6760020c62d5fd797feef6b20c1cbae0ce876 Mon Sep 17 00:00:00 2001 From: deva Date: Mon, 14 Mar 2011 09:15:41 +0000 Subject: Make setKeyboardFocus recursive instead of iterative. --- client/macrowindow.cc | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'client/macrowindow.cc') diff --git a/client/macrowindow.cc b/client/macrowindow.cc index d96facb..3776a6b 100644 --- a/client/macrowindow.cc +++ b/client/macrowindow.cc @@ -289,18 +289,7 @@ void MacroWindow::animated(QWidget *w) if(is_static) return; - printf("SetFocus:\n"); // Set keyboard focus on the first focusable widget in the macro. - QVector< Widget* > widgets; - widgets = mainwidget->widgetList(true); - QVector< Widget* >::iterator i = widgets.begin(); - while(i != widgets.end()) { - Widget *w = *i; - if(w) { - printf("\t%s\n", w->type().toStdString().c_str()); - } - if(w && w->setKeyboardFocus()) break; - i++; - } + mainwidget->setKeyboardFocus(); } } -- cgit v1.2.3