diff options
-rw-r--r-- | sw/source/ui/fldui/flddinf.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sw/source/ui/fldui/flddinf.cxx b/sw/source/ui/fldui/flddinf.cxx index 6ec3db4e8cf8..0603774eb127 100644 --- a/sw/source/ui/fldui/flddinf.cxx +++ b/sw/source/ui/fldui/flddinf.cxx @@ -126,6 +126,7 @@ void SwFieldDokInfPage::Reset(const SfxItemSet* ) std::vector<OUString> aLst; GetFieldMgr().GetSubTypes(TYP_DOCINFOFLD, aLst); std::unique_ptr<weld::TreeIter> xEntry(m_xTypeTLB->make_iterator()); + std::unique_ptr<weld::TreeIter> xExpandEntry; for(size_t i = 0; i < aLst.size(); ++i) { if (!IsFieldEdit() || nSubType == i) @@ -155,7 +156,7 @@ void SwFieldDokInfPage::Reset(const SfxItemSet* ) if (m_sOldCustomFieldName == sEntry) { m_xSelEntry = m_xTypeTLB->make_iterator(xEntry.get()); - m_xTypeTLB->expand_row(*xInfo); + xExpandEntry = m_xTypeTLB->make_iterator(xInfo.get()); } } } @@ -176,6 +177,9 @@ void SwFieldDokInfPage::Reset(const SfxItemSet* ) m_xTypeTLB->thaw(); + if (xExpandEntry) + m_xTypeTLB->expand_row(*xExpandEntry); + // select old Pos if (m_xSelEntry) { |