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

New commits:
commit 79b1a61303af8dc8716c03151b28bfce13162eb0
Author:     Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk>
AuthorDate: Wed May 1 18:52:03 2024 +0900
Commit:     Tomaž Vajngerl <qui...@gmail.com>
CommitDate: Thu May 2 07:47:49 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/+/166962
    Reviewed-by: Tomaž Vajngerl <qui...@gmail.com>
    Tested-by: Jenkins

diff --git a/vcl/inc/jsdialog/jsdialogbuilder.hxx 
b/vcl/inc/jsdialog/jsdialogbuilder.hxx
index 2c544146dfad..7491582e1550 100644
--- a/vcl/inc/jsdialog/jsdialogbuilder.hxx
+++ b/vcl/inc/jsdialog/jsdialogbuilder.hxx
@@ -544,6 +544,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 fa574088c7c6..cb9378f471f8 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -1475,6 +1475,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)
@@ -2340,7 +2346,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