Fix MultiSlideTracker for empty widgets list.
This commit is contained in:
parent
9ab11ccb36
commit
d8b1f46715
1 changed files with 3 additions and 0 deletions
|
|
@ -151,6 +151,9 @@ void SlideWrap<RpWidget>::wrappedSizeUpdated(QSize size) {
|
||||||
}
|
}
|
||||||
|
|
||||||
rpl::producer<bool> MultiSlideTracker::atLeastOneShownValue() const {
|
rpl::producer<bool> MultiSlideTracker::atLeastOneShownValue() const {
|
||||||
|
if (_widgets.empty()) {
|
||||||
|
return rpl::single(false);
|
||||||
|
}
|
||||||
auto shown = std::vector<rpl::producer<bool>>();
|
auto shown = std::vector<rpl::producer<bool>>();
|
||||||
shown.reserve(_widgets.size());
|
shown.reserve(_widgets.size());
|
||||||
for (auto &widget : _widgets) {
|
for (auto &widget : _widgets) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue