sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx | 8 ++++++++ 1 file changed, 8 insertions(+)
New commits: commit d7e5d79db4c447cab87a44c3f80e503463e5dec6 Author: Aron Budea <aron.bu...@collabora.com> AuthorDate: Sat Sep 19 09:16:15 2020 +0200 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Sat Sep 19 13:19:47 2020 +0200 tdf#135674: initialize Styles Inspector on start Change-Id: Iff1c72b0b0f9835414b6a44b08d1da4306162e11 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103030 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx b/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx index 4fa626d3cebf..8ea4fda5e213 100644 --- a/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx +++ b/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx @@ -41,6 +41,8 @@ namespace sw::sidebar { +static void UpdateTree(SwDocShell* pDocSh, std::vector<svx::sidebar::TreeNode>& aStore); + VclPtr<vcl::Window> WriterInspectorTextPanel::Create(vcl::Window* pParent, const uno::Reference<frame::XFrame>& rxFrame) { @@ -65,6 +67,12 @@ WriterInspectorTextPanel::WriterInspectorTextPanel(vcl::Window* pParent, m_oldLink = m_pShell->GetChgLnk(); m_pShell->SetChgLnk(LINK(this, WriterInspectorTextPanel, AttrChangedNotify)); } + + // Update panel on start + std::vector<svx::sidebar::TreeNode> aStore; + if (pDocSh->GetDoc()->GetEditShell()->GetCursor()->GetNode().GetTextNode()) + UpdateTree(pDocSh, aStore); + updateEntries(aStore); } WriterInspectorTextPanel::~WriterInspectorTextPanel() { disposeOnce(); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits