Don't check box visibility in BoxShow.

This commit is contained in:
John Preston 2022-12-07 13:02:48 +04:00
parent d5921e742f
commit 580e6a561f

View file

@ -327,14 +327,14 @@ BoxShow::~BoxShow() = default;
void BoxShow::showBox(
object_ptr<BoxContent> content,
LayerOptions options) const {
if (_weak && _weak->isBoxShown()) {
_weak->getDelegate()->show(std::move(content), options);
if (const auto strong = _weak.data()) {
strong->getDelegate()->show(std::move(content), options);
}
}
void BoxShow::hideLayer() const {
if (_weak && _weak->isBoxShown()) {
_weak->getDelegate()->hideLayer();
if (const auto strong = _weak.data()) {
strong->getDelegate()->hideLayer();
}
}