[Libreoffice-commits] core.git: vcl/unx
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Mon May 11 14:46:12 UTC 2020
vcl/unx/gtk3/gtk3gtkinst.cxx | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
New commits:
commit 0c50447a94d092d1c19edb1bdebf9bf6dde3ae0f
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon May 11 10:04:07 2020 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon May 11 16:45:32 2020 +0200
Resolves: tdf#132902 restore original hierarchy in dtor
so a repeated weld will result in the same layout each time
Change-Id: I9ba41e70c29046b84392280d4bd95f8141b24251
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93953
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 7e05280bbc46..1620077aa79e 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -14304,6 +14304,23 @@ public:
g_signal_handler_disconnect(m_pTreeView, m_nRowActivatedSignalId);
g_signal_handler_disconnect(m_pToggleButton, m_nPopupShownSignalId);
+ gtk_combo_box_set_model(m_pComboBox, m_pTreeModel);
+ gtk_tree_view_set_model(m_pTreeView, nullptr);
+
+ // restore original hierarchy in dtor so a new GtkInstanceComboBox will
+ // result in the same layout each time
+ {
+ g_object_ref(m_pComboBox);
+
+ GtkContainer* pContainer = getContainer();
+
+ gtk_container_remove(pContainer, GTK_WIDGET(m_pComboBox));
+
+ replaceWidget(GTK_WIDGET(pContainer), GTK_WIDGET(m_pComboBox));
+
+ g_object_unref(m_pComboBox);
+ }
+
g_object_unref(m_pComboBuilder);
}
};
More information about the Libreoffice-commits
mailing list