tdf#150916 make unselect in combobox dropdown same as initially unselected
a similar issue as seen in tdf#148197
Change-Id: I3848fe7b48f6148a5ae13d484c866953fed83c90
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140605
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index ca36152..690f39a 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -20820,22 +20820,24 @@ private:
void tree_view_set_cursor(int pos)
{
GtkTreePath* path;
if (pos == -1)
{
path = gtk_tree_path_new();
gtk_tree_selection_unselect_all(gtk_tree_view_get_selection(m_pTreeView));
if (m_pCellView)
gtk_cell_view_set_displayed_row(m_pCellView, nullptr);
}
else
{
GtkTreePath* path = gtk_tree_path_new_from_indices(pos, -1);
path = gtk_tree_path_new_from_indices(pos, -1);
if (gtk_tree_view_get_model(m_pTreeView))
gtk_tree_view_scroll_to_cell(m_pTreeView, path, nullptr, false, 0, 0);
gtk_tree_view_set_cursor(m_pTreeView, path, nullptr, false);
if (m_pCellView)
gtk_cell_view_set_displayed_row(m_pCellView, path);
gtk_tree_path_free(path);
}
gtk_tree_view_set_cursor(m_pTreeView, path, nullptr, false);
gtk_tree_path_free(path);
}
int tree_view_get_cursor() const