提交 19242fd6 编写于 作者: O openharmony_ci 提交者: Gitee

!461 修复UISwipeView loop模式下计算index错误

Merge pull request !461 from guyuanzhang/align2
......@@ -547,14 +547,13 @@ void UISwipeView::CalculateInvalidate()
void UISwipeView::CurrentIndexInc()
{
if (curIndex_ >= childrenNum_ - 1) {
curIndex_++;
if (curIndex_ > childrenNum_ - 1) {
if (IsNeedLoop()) {
curIndex_ = curIndex_ % childrenNum_;
} else {
curIndex_ = childrenNum_ - 1;
}
} else {
curIndex_++;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册