From a7b4b11d9d806716670b6cb7af0c0d3296d7c774 Mon Sep 17 00:00:00 2001 From: wmayer Date: Mon, 16 Mar 2020 17:19:53 +0100 Subject: [PATCH] Gui: [skip ci] improve search function in parameter editor to jump from one top-level item to the sibling item --- src/Gui/DlgParameterFind.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Gui/DlgParameterFind.cpp b/src/Gui/DlgParameterFind.cpp index fc931c5229..9503d95691 100644 --- a/src/Gui/DlgParameterFind.cpp +++ b/src/Gui/DlgParameterFind.cpp @@ -250,6 +250,13 @@ void DlgParameterFind::accept() while (!next && current) { // go to the parent item and try again for each sibling after the current item QTreeWidgetItem* parent = current->parent(); + if (!parent) { + // switch from one top-level group to the next + QTreeWidgetItem* root = groupTree->invisibleRootItem(); + if (root->indexOfChild(current) >= 0) { + parent = root; + } + } if (parent) { int index = parent->indexOfChild(current); for (int i=index+1; ichildCount(); i++) {