This commit is contained in:
Uwe Kindler 2020-06-30 10:00:03 +02:00
commit 4bc1a18db2

View File

@ -1319,9 +1319,9 @@ void CDockContainerWidget::removeDockArea(CDockAreaWidget* area)
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;
auto p = std::find(std::begin(d->LastAddedAreaCache), std::end(d->LastAddedAreaCache), area);
if (p != std::end(d->LastAddedAreaCache)) {
*p = nullptr;
}
// If splitter has more than 1 widgets, we are finished and can leave