[Libreoffice-commits] core.git: vcl/unx

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Mon Sep 30 18:32:51 UTC 2019


 vcl/unx/gtk3/gtk3gtkinst.cxx |   13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

New commits:
commit 2b407a8a9a34423434a1272b9571db8ea0abfa36
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Sep 30 11:53:47 2019 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Sep 30 20:31:50 2019 +0200

    move up to a level to where next sibling exists
    
    Change-Id: Ice03c27c88cf85399cdf8fd824de3860b7e5dfba
    Reviewed-on: https://gerrit.libreoffice.org/79846
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index f5e26be83b59..2b5b6e4ed829 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -8624,12 +8624,15 @@ public:
             rGtkIter.iter = tmp;
             return true;
         }
-        if (!gtk_tree_model_iter_parent(pModel, &tmp, &iter))
-            return false;
-        if (gtk_tree_model_iter_next(pModel, &tmp))
+        // Move up level(s) until we find the level where the next sibling exists.
+        while (gtk_tree_model_iter_parent(pModel, &tmp, &iter))
         {
-            rGtkIter.iter = tmp;
-            return true;
+            iter = tmp;
+            if (gtk_tree_model_iter_next(pModel, &tmp))
+            {
+                rGtkIter.iter = tmp;
+                return true;
+            }
         }
         return false;
     }


More information about the Libreoffice-commits mailing list