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

New commits:
commit 1389f4666bf4a4e05bdb1582f827887332d92167
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Sat Dec 28 22:02:26 2024 +0000
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Sun Dec 29 12:47:44 2024 +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/+/179497
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx
index bcbf7d04393b..030bfa8757fc 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