From c23a5647d61bf0653f5bec11adb23d7e4018fe3e Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Tue, 8 Nov 2011 14:12:34 +0100 Subject: Foxus fix; take 2. --- client/mainwindow.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/client/mainwindow.cc b/client/mainwindow.cc index 4e41418..121412e 100644 --- a/client/mainwindow.cc +++ b/client/mainwindow.cc @@ -356,6 +356,7 @@ void MainWindow::updateTemplates(QDomNodeList &nodes) entities[j] = e; entities[j]->update(node); central->layout()->addWidget(e->widget()); + if(j == 0) e->widget()->setFocus(); } else { entities[j]->update(node); } @@ -366,10 +367,6 @@ void MainWindow::updateTemplates(QDomNodeList &nodes) elem.tagName() + "' tag."); continue; } - - if(entities.size() > 0) { - entities[0]->widget()->setFocus(); - } } void MainWindow::setTemplate(QString name) -- cgit v1.2.3