Don't check box visibility in BoxShow.
This commit is contained in:
parent
d5921e742f
commit
580e6a561f
1 changed files with 4 additions and 4 deletions
|
|
@ -327,14 +327,14 @@ BoxShow::~BoxShow() = default;
|
||||||
void BoxShow::showBox(
|
void BoxShow::showBox(
|
||||||
object_ptr<BoxContent> content,
|
object_ptr<BoxContent> content,
|
||||||
LayerOptions options) const {
|
LayerOptions options) const {
|
||||||
if (_weak && _weak->isBoxShown()) {
|
if (const auto strong = _weak.data()) {
|
||||||
_weak->getDelegate()->show(std::move(content), options);
|
strong->getDelegate()->show(std::move(content), options);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void BoxShow::hideLayer() const {
|
void BoxShow::hideLayer() const {
|
||||||
if (_weak && _weak->isBoxShown()) {
|
if (const auto strong = _weak.data()) {
|
||||||
_weak->getDelegate()->hideLayer();
|
strong->getDelegate()->hideLayer();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue