[Libreoffice-commits] core.git: vcl/unx
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Tue May 12 18:24:46 UTC 2020
vcl/unx/gtk3/gtk3gtkinst.cxx | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
New commits:
commit b3d03b315b5b86994214ac6f0167248ff5bc187b
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue May 12 15:30:29 2020 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue May 12 20:24:08 2020 +0200
allow double-clicking etc to expand on-demand rows too
Change-Id: Idb8bca730d4c8d8da0d4689961cf1468051159d7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94062
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 04fc440f50c6..cfb15f3cb4de 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -9102,7 +9102,7 @@ private:
GtkInstanceTreeIter aIter(nullptr);
if (!get_cursor(&aIter))
return;
- if (iter_has_child(aIter))
+ if (gtk_tree_model_iter_has_child(GTK_TREE_MODEL(m_pTreeStore), &aIter.iter))
get_row_expanded(aIter) ? collapse_row(aIter) : expand_row(aIter);
}
@@ -9540,9 +9540,11 @@ private:
if (!get_cursor(&aIter))
return false;
+ bool bHasChild = gtk_tree_model_iter_has_child(GTK_TREE_MODEL(m_pTreeStore), &aIter.iter);
+
if (pEvent->keyval == GDK_KEY_Right)
{
- if (iter_has_child(aIter) && !get_row_expanded(aIter))
+ if (bHasChild && !get_row_expanded(aIter))
{
expand_row(aIter);
return true;
@@ -9550,7 +9552,7 @@ private:
return false;
}
- if (iter_has_child(aIter) && get_row_expanded(aIter))
+ if (bHasChild && get_row_expanded(aIter))
{
collapse_row(aIter);
return true;
More information about the Libreoffice-commits
mailing list