Remove area from LastAddedAreaCache

This commit is contained in:
Tibo Clausen 2019-05-15 14:20:08 +01:00
parent 641946bff5
commit 69894f3f88

View File

@ -1066,6 +1066,12 @@ void CDockContainerWidget::removeDockArea(CDockAreaWidget* area)
area->setParent(nullptr);
internal::hideEmptyParentSplitters(Splitter);
// Remove this area from cached areas
const auto& cache = d->LastAddedAreaCache;
if (auto p = std::find(cache, cache+sizeof(cache)/sizeof(cache[0]), area)) {
d->LastAddedAreaCache[std::distance(cache, p)] = nullptr;
}
// If splitter has more than 1 widgets, we are finished and can leave
if (Splitter->count() > 1)
{