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 <quikee@gmail.com>
Tested-by: Jenkins
This commit is contained in:
Tomaž Vajngerl 2024-05-01 18:52:03 +09:00 committed by Tomaž Vajngerl
parent 2a5fc2a414
commit 79b1a61303
2 changed files with 9 additions and 1 deletions

View file

@ -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>

View file

@ -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,