From 90ad0740a22bc50c478ad743eef1f30b2fc1b226 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 26 Feb 2020 10:40:09 +0000 Subject: tdf#130915 auto-select first entry when treeview filled MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I3311e2e6f013de7adca5b473609b1dd64187a58f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89530 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- dbaccess/source/ui/misc/WNameMatch.cxx | 3 +++ 1 file changed, 3 insertions(+) (limited to 'dbaccess') diff --git a/dbaccess/source/ui/misc/WNameMatch.cxx b/dbaccess/source/ui/misc/WNameMatch.cxx index fbc0675b4ef0..a48ad89ef231 100644 --- a/dbaccess/source/ui/misc/WNameMatch.cxx +++ b/dbaccess/source/ui/misc/WNameMatch.cxx @@ -327,6 +327,9 @@ void OWizNameMatching::FillListBox(weld::TreeView& rTreeView, const ODatabaseExp rTreeView.set_id(nRow, OUString::number(reinterpret_cast(elem->second))); ++nRow; } + + if (rTreeView.n_children()) + rTreeView.select(0); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit v1.2.3