[Libreoffice-commits] core.git: sw/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Thu Mar 21 21:20:52 UTC 2019
sw/source/uibase/dbui/dbtree.cxx | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
New commits:
commit 5a907fe76bc628629fddb5501727642468d38dae
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Mar 21 14:56:00 2019 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Mar 21 22:20:23 2019 +0100
fix db field page database refresh
Change-Id: I87e18e8624d63de18bd6e0d68eececab75e7166b
Reviewed-on: https://gerrit.libreoffice.org/69527
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sw/source/uibase/dbui/dbtree.cxx b/sw/source/uibase/dbui/dbtree.cxx
index 444ba7b54ec9..a0fb9e06af4d 100644
--- a/sw/source/uibase/dbui/dbtree.cxx
+++ b/sw/source/uibase/dbui/dbtree.cxx
@@ -318,19 +318,20 @@ OUString SwDBTreeList::GetDBName(OUString& rTableName, OUString& rColumnName, sa
{
OUString sDBName;
std::unique_ptr<weld::TreeIter> xIter(m_xTreeView->make_iterator());
- if (m_xTreeView->get_selected(xIter.get()) && m_xTreeView->get_iter_depth(*xIter))
+ if (m_xTreeView->get_selected(xIter.get()))
{
- if (m_xTreeView->get_iter_depth(*xIter) > 1)
+ if (m_xTreeView->get_iter_depth(*xIter) == 2)
{
rColumnName = m_xTreeView->get_text(*xIter);
m_xTreeView->iter_parent(*xIter); // column name was selected
}
- if (pbIsTable)
+ if (m_xTreeView->get_iter_depth(*xIter) == 1)
{
- *pbIsTable = m_xTreeView->get_id(*xIter).isEmpty();
+ if (pbIsTable)
+ *pbIsTable = m_xTreeView->get_id(*xIter).isEmpty();
+ rTableName = m_xTreeView->get_text(*xIter);
+ m_xTreeView->iter_parent(*xIter);
}
- rTableName = m_xTreeView->get_text(*xIter);
- m_xTreeView->iter_parent(*xIter);
sDBName = m_xTreeView->get_text(*xIter);
}
return sDBName;
@@ -348,7 +349,10 @@ void SwDBTreeList::Select(const OUString& rDBName, const OUString& rTableName, c
if (rDBName == m_xTreeView->get_text(*xParent))
{
if (!m_xTreeView->iter_has_child(*xParent))
+ {
+ RequestingChildrenHdl(*xParent);
m_xTreeView->expand_row(*xParent);
+ }
std::unique_ptr<weld::TreeIter> xChild(m_xTreeView->make_iterator(xParent.get()));
if (!m_xTreeView->iter_children(*xChild))
continue;
@@ -362,7 +366,10 @@ void SwDBTreeList::Select(const OUString& rDBName, const OUString& rTableName, c
if (bShowColumns && !rColumnName.isEmpty())
{
if (!m_xTreeView->iter_has_child(*xParent))
+ {
+ RequestingChildrenHdl(*xParent);
m_xTreeView->expand_row(*xParent);
+ }
bNoChild = true;
if (m_xTreeView->iter_children(*xChild))
More information about the Libreoffice-commits
mailing list