From 2130dd5c7e537e21721ece626430de522024ae84 Mon Sep 17 00:00:00 2001 From: Imanol Fernandez Date: Tue, 5 Nov 2019 16:26:35 +0100 Subject: [PATCH] Do not check parent sorting in invisible widgets --- app/src/main/cpp/BrowserWorld.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/src/main/cpp/BrowserWorld.cpp b/app/src/main/cpp/BrowserWorld.cpp index 809e1e3b4..29e8f0fb5 100644 --- a/app/src/main/cpp/BrowserWorld.cpp +++ b/app/src/main/cpp/BrowserWorld.cpp @@ -638,10 +638,12 @@ BrowserWorld::State::SortWidgets() { Widget* wb = db->second.first; // Parenting sort - if (wa && wb && IsParent(*wa, *wb)) { - return true; - } else if (wa && wb && IsParent(*wb, *wa)) { - return false; + if (wa && wb && wa->IsVisible() && wb->IsVisible()) { + if (IsParent(*wa, *wb)) { + return true; + } else if (IsParent(*wb, *wa)) { + return false; + } } // Depth sort