cui/source/dialogs/cuihyperdlg.cxx | 6 ++++++ 1 file changed, 6 insertions(+)
New commits: commit 4646bf95e39edad4cf998c15c160338fb64bb60d Author: Maya Stephens <maya.steph...@collabora.com> AuthorDate: Thu Aug 21 15:07:20 2025 +0000 Commit: Michael Stahl <michael.st...@collabora.com> CommitDate: Fri Aug 22 10:52:22 2025 +0200 Reset hyperlink dialog pages after link data loaded Data about the selected link is loaded in the line GetBindings().Update(SID_HYPERLINK_GETLINK), which requires the page to already exist. This means we end up creating the 4 pages without the correct data to load into them. For selectively hiding fields based on the selection, it can be helpful to know the size of the other tabs, and therefore which fields in them are showing. Therefore, we iterate through the tabs after the data is loaded and reset all of them to ensure each has the correct elements hidden. Change-Id: I6a6a696455c6ff1980fe7d9926a24262b80c5ca7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190006 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Michael Stahl <michael.st...@collabora.com> diff --git a/cui/source/dialogs/cuihyperdlg.cxx b/cui/source/dialogs/cuihyperdlg.cxx index 428ed342a3ac..e0f7f6acccdc 100644 --- a/cui/source/dialogs/cuihyperdlg.cxx +++ b/cui/source/dialogs/cuihyperdlg.cxx @@ -156,6 +156,12 @@ SvxHpLinkDlg::SvxHpLinkDlg(SfxBindings* pBindings, SfxChildWindow* pChild, weld: GetBindings().Update(SID_HYPERLINK_GETLINK); GetBindings().Update(SID_READONLY_MODE); + // Now that we have got the link data, we can reset + // all the pages with the correct information + for (std::unique_ptr<IconChoicePageData>& page: maPageList) { + page->xPage->Reset(*pSet); + } + m_xResetBtn->connect_clicked( LINK( this, SvxHpLinkDlg, ResetHdl ) ); m_xOKBtn->connect_clicked( LINK ( this, SvxHpLinkDlg, ClickOkHdl_Impl ) ); m_xApplyBtn->connect_clicked ( LINK ( this, SvxHpLinkDlg, ClickApplyHdl_Impl ) );