mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-06 23:24:01 +02:00
Destroy layers in reverse order.
This commit is contained in:
parent
a133b43eed
commit
d1cc09f40e
1 changed files with 2 additions and 1 deletions
|
@ -780,7 +780,8 @@ bool LayerStackWidget::takeToThirdSection() {
|
|||
}
|
||||
|
||||
void LayerStackWidget::clearLayers() {
|
||||
for (auto &layer : base::take(_layers)) {
|
||||
for (auto list = base::take(_layers); !list.empty(); list.pop_back()) {
|
||||
const auto layer = std::move(list.back());
|
||||
if (layer->inFocusChain()) {
|
||||
setFocus();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue