include/vcl/weld.hxx                 |   46 ++++++++++++++++++++++++++++-------
 vcl/inc/jsdialog/jsdialogbuilder.hxx |    8 +++---
 vcl/inc/qt5/QtInstanceIconView.hxx   |   12 ++++-----
 vcl/inc/qt5/QtInstanceTreeView.hxx   |    6 ++--
 vcl/inc/salvtables.hxx               |   18 ++++++-------
 vcl/jsdialog/jsdialogbuilder.cxx     |   12 ++++-----
 vcl/qt5/QtInstanceIconView.cxx       |   16 ++++++------
 vcl/qt5/QtInstanceTreeView.cxx       |    4 +--
 vcl/source/app/salvtables.cxx        |   31 ++++++++---------------
 vcl/unx/gtk3/gtkinst.cxx             |   11 +++++---
 10 files changed, 94 insertions(+), 70 deletions(-)

New commits:
commit 8e5ba4f7a48657405ff1223987cc68690d7871c8
Author:     Michael Weghorn <[email protected]>
AuthorDate: Sat Oct 18 00:27:44 2025 +0200
Commit:     Michael Weghorn <[email protected]>
CommitDate: Mon Oct 20 17:07:23 2025 +0200

    tdf#130857 weld: Move signal blocking to TreeView::set_children_on_demand
    
    Apply the changes as described in
    
        Change-Id: If5fba408cc6638441e9856238b19659fed6d7e01
        Author: Michael Weghorn <[email protected]>
        Date:   Fri Oct 17 22:11:02 2025 +0200
    
            tdf#130857 weld: Move signal blocking to TextView::select_region
    
    for this method as well. See the above-mentioned
    commit for more details/background.
    
    Change-Id: I8d87f9f48fe7e3be4dd8336355a900a9fb89eda1
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192621
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <[email protected]>

diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index 2d665ce75bc4..a974e35994f6 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -1074,6 +1074,7 @@ protected:
         return m_aGetSizeHdl.Call(get_size_args(rDevice, rId));
     }
 
+    virtual void do_set_children_on_demand(const TreeIter& rIter, bool 
bChildrenOnDemand) = 0;
     virtual void do_remove_selection() = 0;
 
 public:
@@ -1348,9 +1349,16 @@ public:
     virtual void expand_row(const TreeIter& rIter) = 0;
     // collapse row will first trigger the callback set via connect_collapsing 
before collapsing
     virtual void collapse_row(const TreeIter& rIter) = 0;
+
     // set the empty node to appear as if it has children, true is equivalent
     // to 'insert' with a bChildrenOnDemand of true. See notes above.
-    virtual void set_children_on_demand(const TreeIter& rIter, bool 
bChildrenOnDemand) = 0;
+    void set_children_on_demand(const TreeIter& rIter, bool bChildrenOnDemand)
+    {
+        disable_notify_events();
+        do_set_children_on_demand(rIter, bChildrenOnDemand);
+        enable_notify_events();
+    }
+
     // return if the node is configured to be populated on-demand
     virtual bool get_children_on_demand(const TreeIter& rIter) const = 0;
     // set if the expanders are shown or not
diff --git a/vcl/inc/qt5/QtInstanceTreeView.hxx 
b/vcl/inc/qt5/QtInstanceTreeView.hxx
index 0201b3a104c4..6e089d97dc1d 100644
--- a/vcl/inc/qt5/QtInstanceTreeView.hxx
+++ b/vcl/inc/qt5/QtInstanceTreeView.hxx
@@ -144,8 +144,8 @@ public:
     virtual bool get_row_expanded(const weld::TreeIter& rIter) const override;
     virtual void expand_row(const weld::TreeIter& rIter) override;
     virtual void collapse_row(const weld::TreeIter& rIter) override;
-    virtual void set_children_on_demand(const weld::TreeIter& rIter,
-                                        bool bChildrenOnDemand) override;
+    virtual void do_set_children_on_demand(const weld::TreeIter& rIter,
+                                           bool bChildrenOnDemand) override;
     virtual bool get_children_on_demand(const weld::TreeIter& rIter) const 
override;
     virtual void set_show_expanders(bool bShow) override;
 
diff --git a/vcl/inc/salvtables.hxx b/vcl/inc/salvtables.hxx
index 1a5617d63d24..10831bf7114b 100644
--- a/vcl/inc/salvtables.hxx
+++ b/vcl/inc/salvtables.hxx
@@ -1771,8 +1771,8 @@ public:
 
     virtual bool get_children_on_demand(const weld::TreeIter& rIter) const 
override;
 
-    virtual void set_children_on_demand(const weld::TreeIter& rIter,
-                                        bool bChildrenOnDemand) override;
+    virtual void do_set_children_on_demand(const weld::TreeIter& rIter,
+                                           bool bChildrenOnDemand) override;
 
     virtual void expand_row(const weld::TreeIter& rIter) override;
 
diff --git a/vcl/qt5/QtInstanceTreeView.cxx b/vcl/qt5/QtInstanceTreeView.cxx
index 8914fff93cc5..4736cd157257 100644
--- a/vcl/qt5/QtInstanceTreeView.cxx
+++ b/vcl/qt5/QtInstanceTreeView.cxx
@@ -821,7 +821,7 @@ void QtInstanceTreeView::collapse_row(const weld::TreeIter& 
rIter)
     GetQtInstance().RunInMainThread([&] { 
m_pTreeView->collapse(modelIndex(rIter)); });
 }
 
-void QtInstanceTreeView::set_children_on_demand(const weld::TreeIter&, bool)
+void QtInstanceTreeView::do_set_children_on_demand(const weld::TreeIter&, bool)
 {
     assert(false && "Not implemented yet");
 }
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 43b076fa5ae2..dfd8de71b092 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -4727,11 +4727,9 @@ bool SalInstanceTreeView::get_children_on_demand(const 
weld::TreeIter& rIter) co
     return GetPlaceHolderChild(rVclIter.iter) != nullptr;
 }
 
-void SalInstanceTreeView::set_children_on_demand(const weld::TreeIter& rIter,
-                                                 bool bChildrenOnDemand)
+void SalInstanceTreeView::do_set_children_on_demand(const weld::TreeIter& 
rIter,
+                                                    bool bChildrenOnDemand)
 {
-    disable_notify_events();
-
     const SalInstanceTreeIter& rVclIter = static_cast<const 
SalInstanceTreeIter&>(rIter);
 
     SvTreeListEntry* pPlaceHolder = GetPlaceHolderChild(rVclIter.iter);
@@ -4744,8 +4742,6 @@ void SalInstanceTreeView::set_children_on_demand(const 
weld::TreeIter& rIter,
     }
     else if (!bChildrenOnDemand && pPlaceHolder)
         m_xTreeView->RemoveEntry(pPlaceHolder);
-
-    enable_notify_events();
 }
 
 void SalInstanceTreeView::expand_row(const weld::TreeIter& rIter)
diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index eefcc20af6ba..73b1b96a6409 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -16082,7 +16082,8 @@ public:
         return child_is_placeholder(aIter);
     }
 
-    virtual void set_children_on_demand(const weld::TreeIter& rIter, bool 
bChildrenOnDemand) override
+    virtual void do_set_children_on_demand(const weld::TreeIter& rIter,
+                                           bool bChildrenOnDemand) override
     {
         disable_notify_events();
 
commit 5af25ef372077ab9410875dc65592a7ba1bd8345
Author:     Michael Weghorn <[email protected]>
AuthorDate: Sat Oct 18 00:24:21 2025 +0200
Commit:     Michael Weghorn <[email protected]>
CommitDate: Mon Oct 20 17:07:16 2025 +0200

    tdf#130857 weld: Move signal blocking to TreeView::remove_selection
    
    Apply the changes as described in
    
        Change-Id: If5fba408cc6638441e9856238b19659fed6d7e01
        Author: Michael Weghorn <[email protected]>
        Date:   Fri Oct 17 22:11:02 2025 +0200
    
            tdf#130857 weld: Move signal blocking to TextView::select_region
    
    for this method as well. See the above-mentioned
    commit for more details/background.
    
    Change-Id: I3eb11fff82bebe2326e68567a27accee719fa484
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192620
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <[email protected]>

diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index c738c6771289..2d665ce75bc4 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -1074,6 +1074,8 @@ protected:
         return m_aGetSizeHdl.Call(get_size_args(rDevice, rId));
     }
 
+    virtual void do_remove_selection() = 0;
+
 public:
     virtual void connect_query_tooltip(const Link<const TreeIter&, OUString>& 
rLink)
     {
@@ -1428,8 +1430,14 @@ public:
 
     virtual void set_selection_mode(SelectionMode eMode) = 0;
     virtual int count_selected_rows() const = 0;
+
     // remove the selected nodes
-    virtual void remove_selection() = 0;
+    void remove_selection()
+    {
+        disable_notify_events();
+        do_remove_selection();
+        enable_notify_events();
+    }
 
     // only meaningful is call this from a "changed" callback, true if the 
change
     // was due to mouse hovering over the entry
diff --git a/vcl/inc/qt5/QtInstanceTreeView.hxx 
b/vcl/inc/qt5/QtInstanceTreeView.hxx
index d883820b7b66..0201b3a104c4 100644
--- a/vcl/inc/qt5/QtInstanceTreeView.hxx
+++ b/vcl/inc/qt5/QtInstanceTreeView.hxx
@@ -184,7 +184,7 @@ public:
 
     virtual void set_selection_mode(SelectionMode eMode) override;
     virtual int count_selected_rows() const override;
-    virtual void remove_selection() override;
+    virtual void do_remove_selection() override;
 
     virtual bool changed_by_hover() const override;
 
diff --git a/vcl/inc/salvtables.hxx b/vcl/inc/salvtables.hxx
index 0d1c76df9ae4..1a5617d63d24 100644
--- a/vcl/inc/salvtables.hxx
+++ b/vcl/inc/salvtables.hxx
@@ -1800,7 +1800,7 @@ public:
 
     virtual void connect_visible_range_changed(const Link<weld::TreeView&, 
void>& rLink) override;
 
-    virtual void remove_selection() override;
+    virtual void do_remove_selection() override;
 
     virtual bool is_selected(const weld::TreeIter& rIter) const override;
 
diff --git a/vcl/qt5/QtInstanceTreeView.cxx b/vcl/qt5/QtInstanceTreeView.cxx
index 4be1be3bcc1e..8914fff93cc5 100644
--- a/vcl/qt5/QtInstanceTreeView.cxx
+++ b/vcl/qt5/QtInstanceTreeView.cxx
@@ -1026,7 +1026,7 @@ void QtInstanceTreeView::set_selection_mode(SelectionMode 
eMode)
 
 int QtInstanceTreeView::count_selected_rows() const { return 
get_selected_rows().size(); }
 
-void QtInstanceTreeView::remove_selection() { assert(false && "Not implemented 
yet"); }
+void QtInstanceTreeView::do_remove_selection() { assert(false && "Not 
implemented yet"); }
 
 bool QtInstanceTreeView::changed_by_hover() const
 {
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 2ff0c3576e52..43b076fa5ae2 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -4846,9 +4846,8 @@ void 
SalInstanceTreeView::connect_visible_range_changed(const Link<weld::TreeVie
     m_xTreeView->SetScrolledHdl(LINK(this, SalInstanceTreeView, 
VisibleRangeChangedHdl));
 }
 
-void SalInstanceTreeView::remove_selection()
+void SalInstanceTreeView::do_remove_selection()
 {
-    disable_notify_events();
     SvTreeListEntry* pSelected = m_xTreeView->FirstSelected();
     while (pSelected)
     {
@@ -4856,7 +4855,6 @@ void SalInstanceTreeView::remove_selection()
         m_xTreeView->RemoveEntry(pSelected);
         pSelected = pNextSelected;
     }
-    enable_notify_events();
 }
 
 bool SalInstanceTreeView::is_selected(const weld::TreeIter& rIter) const
diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 094722dab6c7..eefcc20af6ba 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -16000,7 +16000,7 @@ public:
         enable_notify_events();
     }
 
-    virtual void remove_selection() override
+    virtual void do_remove_selection() override
     {
         disable_notify_events();
 
commit 873c2914f31e121234641c1ad964acc960ecf343
Author:     Michael Weghorn <[email protected]>
AuthorDate: Sat Oct 18 00:17:58 2025 +0200
Commit:     Michael Weghorn <[email protected]>
CommitDate: Mon Oct 20 17:07:09 2025 +0200

    tdf#130857 weld: Move signal blocking to IconView::insert
    
    Apply the changes as described in
    
        Change-Id: If5fba408cc6638441e9856238b19659fed6d7e01
        Author: Michael Weghorn <[email protected]>
        Date:   Fri Oct 17 22:11:02 2025 +0200
    
            tdf#130857 weld: Move signal blocking to TextView::select_region
    
    for the two IconView::insert variants as well.
    See the above-mentioned commit for more details/background.
    
    In this case, SalInstanceIconView has a helper that
    called by both variants that previously was responsible
    for the signal (un)blocking.
    
    Change-Id: I84a7b2ac1d1cbb09e90a651ef50a337817d184ac
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192641
    Reviewed-by: Michael Weghorn <[email protected]>
    Tested-by: Jenkins

diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index 6286b431569e..c738c6771289 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -1509,6 +1509,12 @@ protected:
         return m_aQueryTooltipHdl.Call(rIter);
     }
 
+    virtual void do_insert(int pos, const OUString* pStr, const OUString* pId,
+                           const OUString* pIconName, TreeIter* pRet)
+        = 0;
+    virtual void do_insert(int pos, const OUString* pStr, const OUString* pId, 
const Bitmap* pIcon,
+                           TreeIter* pRet)
+        = 0;
     virtual void do_select(int pos) = 0;
     virtual void do_unselect(int pos) = 0;
     virtual void do_clear() = 0;
@@ -1520,13 +1526,21 @@ public:
     virtual int get_item_width() const = 0;
     virtual void set_item_width(int width) = 0;
 
-    virtual void insert(int pos, const OUString* pStr, const OUString* pId,
-                        const OUString* pIconName, TreeIter* pRet)
-        = 0;
+    void insert(int pos, const OUString* pStr, const OUString* pId, const 
OUString* pIconName,
+                TreeIter* pRet)
+    {
+        disable_notify_events();
+        do_insert(pos, pStr, pId, pIconName, pRet);
+        enable_notify_events();
+    }
 
-    virtual void insert(int pos, const OUString* pStr, const OUString* pId, 
const Bitmap* pIcon,
-                        TreeIter* pRet)
-        = 0;
+    void insert(int pos, const OUString* pStr, const OUString* pId, const 
Bitmap* pIcon,
+                TreeIter* pRet)
+    {
+        disable_notify_events();
+        do_insert(pos, pStr, pId, pIcon, pRet);
+        enable_notify_events();
+    }
 
     virtual void insert_separator(int pos, const OUString* pId) = 0;
 
diff --git a/vcl/inc/jsdialog/jsdialogbuilder.hxx 
b/vcl/inc/jsdialog/jsdialogbuilder.hxx
index 306cf8236708..2767d8a68af5 100644
--- a/vcl/inc/jsdialog/jsdialogbuilder.hxx
+++ b/vcl/inc/jsdialog/jsdialogbuilder.hxx
@@ -740,11 +740,11 @@ public:
     JSIconView(JSDialogSender* pSender, ::IconView* pIconView, 
SalInstanceBuilder* pBuilder,
                bool bTakeOwnership);
 
-    virtual void insert(int pos, const OUString* pStr, const OUString* pId,
-                        const OUString* pIconName, weld::TreeIter* pRet) 
override;
+    virtual void do_insert(int pos, const OUString* pStr, const OUString* pId,
+                           const OUString* pIconName, weld::TreeIter* pRet) 
override;
 
-    virtual void insert(int pos, const OUString* pStr, const OUString* pId, 
const Bitmap* pIcon,
-                        weld::TreeIter* pRet) override;
+    virtual void do_insert(int pos, const OUString* pStr, const OUString* pId, 
const Bitmap* pIcon,
+                           weld::TreeIter* pRet) override;
 
     virtual void insert_separator(int pos, const OUString* pId) override;
 
diff --git a/vcl/inc/qt5/QtInstanceIconView.hxx 
b/vcl/inc/qt5/QtInstanceIconView.hxx
index a6f8f08bef71..e5db98f36e1f 100644
--- a/vcl/inc/qt5/QtInstanceIconView.hxx
+++ b/vcl/inc/qt5/QtInstanceIconView.hxx
@@ -28,11 +28,11 @@ public:
     virtual int get_item_width() const override;
     virtual void set_item_width(int width) override;
 
-    virtual void insert(int nPos, const OUString* pStr, const OUString* pId,
-                        const OUString* pIconName, weld::TreeIter* pRet) 
override;
+    virtual void do_insert(int nPos, const OUString* pStr, const OUString* pId,
+                           const OUString* pIconName, weld::TreeIter* pRet) 
override;
 
-    virtual void insert(int nPos, const OUString* pStr, const OUString* pId, 
const Bitmap* pIcon,
-                        weld::TreeIter* pRet) override;
+    virtual void do_insert(int nPos, const OUString* pStr, const OUString* 
pId, const Bitmap* pIcon,
+                           weld::TreeIter* pRet) override;
 
     virtual void insert_separator(int pos, const OUString* pId) override;
 
@@ -76,8 +76,8 @@ protected:
     virtual bool handleToolTipEvent(const QHelpEvent& rHelpEvent) override;
 
 private:
-    void insert(int nPos, const OUString* pStr, const OUString* pId, const 
QPixmap* pIcon,
-                weld::TreeIter* pRet);
+    void do_insert(int nPos, const OUString* pStr, const OUString* pId, const 
QPixmap* pIcon,
+                   weld::TreeIter* pRet);
 
     QModelIndex modelIndex(int nPos) const;
     QModelIndex modelIndex(const weld::TreeIter& rIter) const;
diff --git a/vcl/inc/salvtables.hxx b/vcl/inc/salvtables.hxx
index 995dc3bcd9d6..0d1c76df9ae4 100644
--- a/vcl/inc/salvtables.hxx
+++ b/vcl/inc/salvtables.hxx
@@ -1903,8 +1903,8 @@ private:
     DECL_LINK(TooltipHdl, SvTreeListEntry*, OUString);
     DECL_LINK(DumpImageHdl, const ::IconView::encoded_image_query&, bool);
 
-    void insert(int pos, const OUString* pStr, const OUString* pId, const 
Image& rImage,
-                weld::TreeIter* pRet);
+    void do_insert(int pos, const OUString* pStr, const OUString* pId, const 
Image& rImage,
+                   weld::TreeIter* pRet);
 
 public:
     SalInstanceIconView(::IconView* pIconView, SalInstanceBuilder* pBuilder, 
bool bTakeOwnership);
@@ -1916,11 +1916,11 @@ public:
 
     virtual void thaw() override;
 
-    virtual void insert(int pos, const OUString* pStr, const OUString* pId,
-                        const OUString* pIconName, weld::TreeIter* pRet) 
override;
+    virtual void do_insert(int pos, const OUString* pStr, const OUString* pId,
+                           const OUString* pIconName, weld::TreeIter* pRet) 
override;
 
-    virtual void insert(int pos, const OUString* pStr, const OUString* pId, 
const Bitmap* pIcon,
-                        weld::TreeIter* pRet) override;
+    virtual void do_insert(int pos, const OUString* pStr, const OUString* pId, 
const Bitmap* pIcon,
+                           weld::TreeIter* pRet) override;
 
     virtual void insert_separator(int pos, const OUString* pId) override;
 
diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index 2508e9ee292f..074e21b7ce97 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -1884,17 +1884,17 @@ JSIconView::JSIconView(JSDialogSender* pSender, 
::IconView* pIconView, SalInstan
 {
 }
 
-void JSIconView::insert(int pos, const OUString* pStr, const OUString* pId,
-                        const OUString* pIconName, weld::TreeIter* pRet)
+void JSIconView::do_insert(int pos, const OUString* pStr, const OUString* pId,
+                           const OUString* pIconName, weld::TreeIter* pRet)
 {
-    SalInstanceIconView::insert(pos, pStr, pId, pIconName, pRet);
+    SalInstanceIconView::do_insert(pos, pStr, pId, pIconName, pRet);
     sendUpdate();
 }
 
-void JSIconView::insert(int pos, const OUString* pStr, const OUString* pId, 
const Bitmap* pIcon,
-                        weld::TreeIter* pRet)
+void JSIconView::do_insert(int pos, const OUString* pStr, const OUString* pId, 
const Bitmap* pIcon,
+                           weld::TreeIter* pRet)
 {
-    SalInstanceIconView::insert(pos, pStr, pId, pIcon, pRet);
+    SalInstanceIconView::do_insert(pos, pStr, pId, pIcon, pRet);
     sendUpdate();
 }
 
diff --git a/vcl/qt5/QtInstanceIconView.cxx b/vcl/qt5/QtInstanceIconView.cxx
index c5b1d4c9fc9c..ed0382439180 100644
--- a/vcl/qt5/QtInstanceIconView.cxx
+++ b/vcl/qt5/QtInstanceIconView.cxx
@@ -45,8 +45,8 @@ int QtInstanceIconView::get_item_width() const
 
 void QtInstanceIconView::set_item_width(int) { assert(false && "Not 
implemented yet"); }
 
-void QtInstanceIconView::insert(int nPos, const OUString* pStr, const 
OUString* pId,
-                                const QPixmap* pIcon, weld::TreeIter* pRet)
+void QtInstanceIconView::do_insert(int nPos, const OUString* pStr, const 
OUString* pId,
+                                   const QPixmap* pIcon, weld::TreeIter* pRet)
 {
     assert(!pRet && "Support for pRet param not implemented yet");
     (void)pRet;
@@ -74,26 +74,26 @@ void QtInstanceIconView::insert(int nPos, const OUString* 
pStr, const OUString*
     });
 }
 
-void QtInstanceIconView::insert(int nPos, const OUString* pStr, const 
OUString* pId,
-                                const OUString* pIconName, weld::TreeIter* 
pRet)
+void QtInstanceIconView::do_insert(int nPos, const OUString* pStr, const 
OUString* pId,
+                                   const OUString* pIconName, weld::TreeIter* 
pRet)
 {
     std::optional<QPixmap> oPixmap;
     if (pIconName)
         oPixmap = loadQPixmapIcon(*pIconName);
 
     const QPixmap* pPixmapIcon = oPixmap.has_value() ? &oPixmap.value() : 
nullptr;
-    insert(nPos, pStr, pId, pPixmapIcon, pRet);
+    do_insert(nPos, pStr, pId, pPixmapIcon, pRet);
 }
 
-void QtInstanceIconView::insert(int nPos, const OUString* pStr, const 
OUString* pId,
-                                const Bitmap* pIcon, weld::TreeIter* pRet)
+void QtInstanceIconView::do_insert(int nPos, const OUString* pStr, const 
OUString* pId,
+                                   const Bitmap* pIcon, weld::TreeIter* pRet)
 {
     std::optional<QPixmap> oPixmap;
     if (pIcon)
         oPixmap = toQPixmap(*pIcon);
 
     const QPixmap* pPixmapIcon = oPixmap.has_value() ? &oPixmap.value() : 
nullptr;
-    insert(nPos, pStr, pId, pPixmapIcon, pRet);
+    do_insert(nPos, pStr, pId, pPixmapIcon, pRet);
 }
 
 void QtInstanceIconView::insert_separator(int, const OUString*)
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index e5569cbea5e1..2ff0c3576e52 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -5341,10 +5341,9 @@ void SalInstanceIconView::thaw()
     SalInstanceWidget::thaw();
 }
 
-void SalInstanceIconView::insert(int pos, const OUString* pStr, const 
OUString* pId,
-                                 const Image& rImage, weld::TreeIter* pRet)
+void SalInstanceIconView::do_insert(int pos, const OUString* pStr, const 
OUString* pId,
+                                    const Image& rImage, weld::TreeIter* pRet)
 {
-    disable_notify_events();
     auto nInsertPos = pos == -1 ? TREELIST_APPEND : pos;
     void* pUserData;
     if (pId)
@@ -5370,22 +5369,20 @@ void SalInstanceIconView::insert(int pos, const 
OUString* pStr, const OUString*
         SalInstanceTreeIter* pVclRetIter = 
static_cast<SalInstanceTreeIter*>(pRet);
         pVclRetIter->iter = pEntry;
     }
-
-    enable_notify_events();
 }
 
-void SalInstanceIconView::insert(int pos, const OUString* pStr, const 
OUString* pId,
-                                 const OUString* pIconName, weld::TreeIter* 
pRet)
+void SalInstanceIconView::do_insert(int pos, const OUString* pStr, const 
OUString* pId,
+                                    const OUString* pIconName, weld::TreeIter* 
pRet)
 {
     const Image aImage = pIconName ? createImage(*pIconName) : Image();
-    insert(pos, pStr, pId, aImage, pRet);
+    do_insert(pos, pStr, pId, aImage, pRet);
 }
 
-void SalInstanceIconView::insert(int pos, const OUString* pStr, const 
OUString* pId,
-                                 const Bitmap* pIcon, weld::TreeIter* pRet)
+void SalInstanceIconView::do_insert(int pos, const OUString* pStr, const 
OUString* pId,
+                                    const Bitmap* pIcon, weld::TreeIter* pRet)
 {
     const Image aImage = pIcon ? Image(*pIcon) : Image();
-    insert(pos, pStr, pId, aImage, pRet);
+    do_insert(pos, pStr, pId, aImage, pRet);
 }
 
 void SalInstanceIconView::insert_separator(int pos, const OUString* /* pId */)
diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index dac0e32cd0be..094722dab6c7 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -17045,7 +17045,8 @@ public:
         gtk_icon_view_set_item_width(m_pIconView, width);
     }
 
-    virtual void insert(int pos, const OUString* pText, const OUString* pId, 
const OUString* pIconName, weld::TreeIter* pRet) override
+    virtual void do_insert(int pos, const OUString* pText, const OUString* pId,
+                           const OUString* pIconName, weld::TreeIter* pRet) 
override
     {
         disable_notify_events();
         GtkTreeIter iter;
@@ -17058,7 +17059,8 @@ public:
         enable_notify_events();
     }
 
-    virtual void insert(int pos, const OUString* pText, const OUString* pId, 
const Bitmap* pIcon, weld::TreeIter* pRet) override
+    virtual void do_insert(int pos, const OUString* pText, const OUString* 
pId, const Bitmap* pIcon,
+                           weld::TreeIter* pRet) override
     {
         disable_notify_events();
         GtkTreeIter iter;

Reply via email to