diff options
-rw-r--r-- | vcl/inc/salvtables.hxx | 2 | ||||
-rw-r--r-- | vcl/source/app/salvtables.cxx | 9 |
2 files changed, 9 insertions, 2 deletions
diff --git a/vcl/inc/salvtables.hxx b/vcl/inc/salvtables.hxx index cbb9fce51eee..096675cf9a49 100644 --- a/vcl/inc/salvtables.hxx +++ b/vcl/inc/salvtables.hxx @@ -1548,6 +1548,8 @@ protected: DECL_LINK(CustomRenderHdl, svtree_render_args, void); DECL_LINK(CustomMeasureHdl, svtree_measure_args, Size); + bool ExpandRow(const SalInstanceTreeIter& rIter); + // Each row has a cell for the expander image, (and an optional cell for a // checkbutton if enable_toggle_buttons has been called) which precede // index 0 diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index 0b818bf2f5f4..faad9efb1e3a 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -4815,7 +4815,7 @@ void SalInstanceTreeView::expand_row(const weld::TreeIter& rIter) { assert(m_xTreeView->IsUpdateMode() && "don't expand when frozen"); const SalInstanceTreeIter& rVclIter = static_cast<const SalInstanceTreeIter&>(rIter); - if (!m_xTreeView->IsExpanded(rVclIter.iter) && signal_expanding(rIter)) + if (!m_xTreeView->IsExpanded(rVclIter.iter) && ExpandRow(rVclIter)) m_xTreeView->Expand(rVclIter.iter); } @@ -5329,7 +5329,12 @@ IMPL_LINK_NOARG(SalInstanceTreeView, ExpandingHdl, SvTreeListBox*, bool) } // expanding + return ExpandRow(aIter); +} +bool SalInstanceTreeView::ExpandRow(const SalInstanceTreeIter& rIter) +{ + SvTreeListEntry* pEntry = rIter.iter; // if there's a preexisting placeholder child, required to make this // potentially expandable in the first place, now we remove it SvTreeListEntry* pPlaceHolder = GetPlaceHolderChild(pEntry); @@ -5339,7 +5344,7 @@ IMPL_LINK_NOARG(SalInstanceTreeView, ExpandingHdl, SvTreeListBox*, bool) m_xTreeView->RemoveEntry(pPlaceHolder); } - bool bRet = signal_expanding(aIter); + bool bRet = signal_expanding(rIter); if (pPlaceHolder) { |