From 7c81a8f5a12b754efd06681e017066008f00afa6 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 12 Feb 2020 15:49:21 +0000 Subject: tdf#130161 detect if a node already had an expansion attempt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit and so isn't in child-on-demand mode anymore, in which case in basctl new module/dialog children should be appended to it similarly to how they are added if had been expanded in the earlier attempt Change-Id: I75255fb743852c70e194bbf4828cd90b9112db79 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88544 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- basctl/source/basicide/bastype2.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'basctl/source/basicide') diff --git a/basctl/source/basicide/bastype2.cxx b/basctl/source/basicide/bastype2.cxx index a0bff5610898..7754bd5792ab 100644 --- a/basctl/source/basicide/bastype2.cxx +++ b/basctl/source/basicide/bastype2.cxx @@ -253,7 +253,9 @@ void SbTreeListBox::ImpCreateLibEntries(const weld::TreeIter& rIter, const Scrip if (bLibRootEntry) { SetEntryBitmaps(*xLibRootEntry, sId); - if (m_xControl->get_row_expanded(*xLibRootEntry)) + bool bRowExpanded = m_xControl->get_row_expanded(*xLibRootEntry); + bool bRowExpandAttempted = !m_xControl->get_children_on_demand(*xLibRootEntry); + if (bRowExpanded || bRowExpandAttempted) ImpCreateLibSubEntries(*xLibRootEntry, rDocument, aLibName); } else -- cgit