Fix possible crash in InnerDropdown hiding.
This commit is contained in:
parent
05d1ee3796
commit
dbcb6a35b0
1 changed files with 4 additions and 3 deletions
|
|
@ -247,15 +247,16 @@ void InnerDropdown::hideFinished() {
|
||||||
void InnerDropdown::prepareCache() {
|
void InnerDropdown::prepareCache() {
|
||||||
if (_a_opacity.animating()) return;
|
if (_a_opacity.animating()) return;
|
||||||
|
|
||||||
|
const auto animating = _a_show.animating();
|
||||||
auto showAnimation = base::take(_a_show);
|
auto showAnimation = base::take(_a_show);
|
||||||
auto showAnimationData = base::take(_showAnimation);
|
auto showAnimationData = base::take(_showAnimation);
|
||||||
showChildren();
|
showChildren();
|
||||||
_cache = GrabWidget(this);
|
_cache = GrabWidget(this);
|
||||||
_showAnimation = base::take(showAnimationData);
|
if (animating) {
|
||||||
_a_show = base::take(showAnimation);
|
|
||||||
if (_a_show.animating()) {
|
|
||||||
hideChildren();
|
hideChildren();
|
||||||
}
|
}
|
||||||
|
_showAnimation = base::take(showAnimationData);
|
||||||
|
_a_show = base::take(showAnimation);
|
||||||
}
|
}
|
||||||
|
|
||||||
void InnerDropdown::startOpacityAnimation(bool hiding) {
|
void InnerDropdown::startOpacityAnimation(bool hiding) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue