Skip to content

Commit 69894f3

Browse files
committed
Remove area from LastAddedAreaCache
1 parent 641946b commit 69894f3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/DockContainerWidget.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1066,6 +1066,12 @@ void CDockContainerWidget::removeDockArea(CDockAreaWidget* area)
10661066
area->setParent(nullptr);
10671067
internal::hideEmptyParentSplitters(Splitter);
10681068

1069+
// Remove this area from cached areas
1070+
const auto& cache = d->LastAddedAreaCache;
1071+
if (auto p = std::find(cache, cache+sizeof(cache)/sizeof(cache[0]), area)) {
1072+
d->LastAddedAreaCache[std::distance(cache, p)] = nullptr;
1073+
}
1074+
10691075
// If splitter has more than 1 widgets, we are finished and can leave
10701076
if (Splitter->count() > 1)
10711077
{

0 commit comments

Comments
 (0)