Don't loose focus from layer in animation.

This commit is contained in:
John Preston 2020-03-18 16:14:19 +04:00
parent e4e8faaa73
commit ed97ff0d4f

View file

@ -633,12 +633,21 @@ void LayerStackWidget::prepareForAnimation() {
show(); show();
} }
if (_mainMenu) { if (_mainMenu) {
if (Ui::InFocusChain(_mainMenu)) {
setFocus();
}
_mainMenu->hide(); _mainMenu->hide();
} }
if (_specialLayer) { if (_specialLayer) {
if (Ui::InFocusChain(_specialLayer)) {
setFocus();
}
_specialLayer->hide(); _specialLayer->hide();
} }
if (const auto layer = currentLayer()) { if (const auto layer = currentLayer()) {
if (Ui::InFocusChain(layer)) {
setFocus();
}
layer->hide(); layer->hide();
} }
} }