summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/mainwindow.cc5
1 files changed, 1 insertions, 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)