dbaccess/source/ui/control/dbtreelistbox.cxx |   12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

New commits:
commit 26f7d989b7cee0843eaa36862d15a02a7060556c
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Sun Oct 9 20:40:41 2022 +0100
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Mon Oct 10 12:08:45 2022 +0200

    Resolves: tdf#151441 queries don't show any content
    
    Change-Id: I66ec14c7cb8816bc2181cc25f7d7f31fdc7d1604
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141069
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>
    Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakan...@libreoffice.org>
    Reviewed-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
    Tested-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com>

diff --git a/dbaccess/source/ui/control/dbtreelistbox.cxx 
b/dbaccess/source/ui/control/dbtreelistbox.cxx
index 09ca5b466715..eb89e1fdb307 100644
--- a/dbaccess/source/ui/control/dbtreelistbox.cxx
+++ b/dbaccess/source/ui/control/dbtreelistbox.cxx
@@ -186,8 +186,16 @@ TreeListBox::~TreeListBox()
 std::unique_ptr<weld::TreeIter> 
TreeListBox::GetEntryPosByName(std::u16string_view aName, const weld::TreeIter* 
pStart, const IEntryFilter* _pFilter) const
 {
     auto xEntry(m_xTreeView->make_iterator(pStart));
-    if (!pStart && !m_xTreeView->get_iter_first(*xEntry))
-        return nullptr;
+    if (pStart)
+    {
+        if (!m_xTreeView->iter_children(*xEntry))
+            return nullptr;
+    }
+    else
+    {
+        if (!m_xTreeView->get_iter_first(*xEntry))
+            return nullptr;
+    }
 
     do
     {

Reply via email to