From 9f952c38f070ffee350936802a213460b1f4b5cf Mon Sep 17 00:00:00 2001 From: mfreiholz Date: Tue, 1 Mar 2016 07:41:13 +0100 Subject: [PATCH] takeContents now also searches for SC in hidden items. Otherwise we sometimes get a crash during restoreState. --- AdvancedDockingSystem/src/ContainerWidget.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/AdvancedDockingSystem/src/ContainerWidget.cpp b/AdvancedDockingSystem/src/ContainerWidget.cpp index 12469c3..910eb4a 100644 --- a/AdvancedDockingSystem/src/ContainerWidget.cpp +++ b/AdvancedDockingSystem/src/ContainerWidget.cpp @@ -1050,6 +1050,14 @@ bool ContainerWidget::takeContent(const SectionContent::RefPtr& sc, InternalCont _floatings.at(i)->takeContent(data); } + // Search in hidden items + if (!found && _hiddenSectionContents.contains(sc->uid())) + { + const HiddenSectionItem hsi = _hiddenSectionContents.take(sc->uid()); + data = hsi.data; + found = true; + } + return found; }