diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-03-21 14:56:00 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-03-21 22:20:23 +0100 |
commit | 5a907fe76bc628629fddb5501727642468d38dae (patch) | |
tree | 541eef96e27f131845a783216fe883ad439a9017 /sw/source/uibase/dbui/dbtree.cxx | |
parent | 2708a37e99ac6c923940573eca7627620557ccce (diff) |
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@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/source/uibase/dbui/dbtree.cxx')
-rw-r--r-- | sw/source/uibase/dbui/dbtree.cxx | 19 |
1 files changed, 13 insertions, 6 deletions
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)) |