svx/source/form/datanavi.cxx |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

New commits:
commit 059eb5a1ae635e7069a765f9bf3d14f24f0ada9f
Author:     Caolán McNamara <[email protected]>
AuthorDate: Sat Dec 28 22:02:26 2024 +0000
Commit:     Adolfo Jayme Barrientos <[email protected]>
CommitDate: Wed Jan 1 07:56:40 2025 +0100

    Resolves: tdf#154683 select the saved page after loading the Model
    
    The default Instance page needs to be selected at LoadModel time in
    order to get its tab text updated automatically. Easiest thing to do
    here is to load with the default page selected and restore the user's
    saved page afterwards.
    
    Change-Id: I4ac5231894834f258d33108e4ebcb2f0af062922
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179498
    Tested-by: Jenkins
    Reviewed-by: Adolfo Jayme Barrientos <[email protected]>

diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx
index 1831f0255dc7..8d4eae42323a 100644
--- a/svx/source/form/datanavi.cxx
+++ b/svx/source/form/datanavi.cxx
@@ -1324,9 +1324,6 @@ namespace svxform
 
         m_xInstanceBtn->set_item_active(u"instancesdetails"_ustr, 
m_bShowDetails);
 
-        m_xTabCtrl->set_current_page(sPageId);
-        ActivatePageHdl(sPageId);
-
         // get our frame
         assert(pBindings != nullptr &&
                     "DataNavigatorWindow::LoadModels(): no SfxBindings; can't 
get frame");
@@ -1339,6 +1336,12 @@ namespace svxform
         // load xforms models of the current document
         LoadModels();
 
+        // tdf#154683 Select the current page after loading the Models, the 
default
+        // Instance page needs to be selected at LoadModel time in order to 
get its
+        // tab text updated automatically.
+        m_xTabCtrl->set_current_page(sPageId);
+        ActivatePageHdl(sPageId);
+
         // tdf#154322 select the first entry of the current page by default
         if (XFormsPage* pPage = GetPage(sPageId))
             pPage->SelectFirstEntry();

Reply via email to