vcl/inc/jsdialog/jsdialogbuilder.hxx |    2 ++
 vcl/jsdialog/jsdialogbuilder.cxx     |    8 +++++++-
 2 files changed, 9 insertions(+), 1 deletion(-)

New commits:
commit 6b2c007745469e769e4d3173602550f2905af9cd
Author:     Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk>
AuthorDate: Wed May 1 18:52:03 2024 +0900
Commit:     Szymon Kłos <szymon.k...@collabora.com>
CommitDate: Thu May 2 09:59:58 2024 +0200

    jsdialog: fix updating on container "reorder_child" or "move"
    
    The accessibility checker sidebar did not update properly when
    new issues were added or were removed. The accessiblity checker
    is adding and removing new widget parts (one for each new issues)
    to the grids, which is using "reorder_child" and "move" methods.
    If we call "reorder_child" with update, it fails in online as it
    doesn't find the parent "box" ("box_document" for example) because
    the id is not set properly. Doing a full update on "reorder_child"
    fixes the updating problem.
    
    Change-Id: Ia3032516a7cee0271f8b05b22e13dde2b7430e66
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166956
    Reviewed-by: Szymon Kłos <szymon.k...@collabora.com>
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>

diff --git a/vcl/inc/jsdialog/jsdialogbuilder.hxx 
b/vcl/inc/jsdialog/jsdialogbuilder.hxx
index 6a88d270351f..71061c27cb3b 100644
--- a/vcl/inc/jsdialog/jsdialogbuilder.hxx
+++ b/vcl/inc/jsdialog/jsdialogbuilder.hxx
@@ -541,6 +541,8 @@ class JSContainer final : public 
JSWidget<SalInstanceContainer, vcl::Window>
 public:
     JSContainer(JSDialogSender* pSender, vcl::Window* pContainer, 
SalInstanceBuilder* pBuilder,
                 bool bTakeOwnership);
+
+    void move(weld::Widget* pWidget, weld::Container* pNewParent) override;
 };
 
 class JSScrolledWindow final : public JSWidget<SalInstanceScrolledWindow, 
::VclScrolledWindow>
diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index 1704988084f1..709f4461470e 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -1480,6 +1480,12 @@ JSContainer::JSContainer(JSDialogSender* pSender, 
vcl::Window* pContainer,
 {
 }
 
+void JSContainer::move(weld::Widget* pWidget, weld::Container* pNewParent)
+{
+    SalInstanceContainer::move(pWidget, pNewParent);
+    sendFullUpdate();
+}
+
 JSScrolledWindow::JSScrolledWindow(JSDialogSender* pSender, 
::VclScrolledWindow* pContainer,
                                    SalInstanceBuilder* pBuilder, bool 
bTakeOwnership,
                                    bool bUserManagedScrolling)
@@ -2345,7 +2351,7 @@ JSBox::JSBox(JSDialogSender* pSender, VclBox* pBox, 
SalInstanceBuilder* pBuilder
 void JSBox::reorder_child(weld::Widget* pWidget, int nNewPosition)
 {
     SalInstanceBox::reorder_child(pWidget, nNewPosition);
-    sendUpdate();
+    sendFullUpdate();
 }
 
 JSImage::JSImage(JSDialogSender* pSender, FixedImage* pImage, 
SalInstanceBuilder* pBuilder,

Reply via email to