From 3cf75cdce41a9d1e40dc2398cca295bf28d54d2e Mon Sep 17 00:00:00 2001 From: cutealien Date: Tue, 27 Sep 2022 16:02:39 +0000 Subject: [PATCH] Fix IGUIElements not getting a tab order because of invisible or disabled parents. First problem was that IGUIElement::getNextElement wasn't passing includeInvisible and includeDisabled flags recursively, so anything deeper than one level could fail if an element was disabled/invisible in between while it was created. Second problem was that setTabOrder(-1) did ignore disabled elements. So when any parent was disabled when elements were created they never got a tab order. git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6428 dfc29bdd-3216-0410-991c-e03cc46cb475 --- include/IGUIElement.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/IGUIElement.h b/include/IGUIElement.h index 4026b7eb..15fd3d15 100644 --- a/include/IGUIElement.h +++ b/include/IGUIElement.h @@ -433,7 +433,7 @@ public: if (el) { // find the highest element number - el->getNextElement(-1, true, IsTabGroup, first, closest, true); + el->getNextElement(-1, true, IsTabGroup, first, closest, true, true); if (first) { TabOrder = first->getTabOrder() + 1; @@ -706,7 +706,7 @@ public: } } // search within children - if ((*it)->getNextElement(startOrder, reverse, group, first, closest)) + if ((*it)->getNextElement(startOrder, reverse, group, first, closest, includeInvisible, includeDisabled)) { return true; }