float indexHeight = GetIndexHeight() / pIndex->GetChildCount();
int omissionIndexOrder = 0;
- if (!(_FloatCompare(touchY, 0.0f) || _FloatCompare(indexHeight, 0.0f)))
+ if ((touchY > 0.0f) && !_FloatCompare(indexHeight, 0.0f))
{
omissionIndexOrder = _CoordinateSystemUtils::ConvertToInteger(touchY / indexHeight);
}
void
_FastScrollIndexView::SetSelectedIndexInOmittedIndex(_FastScrollIndex* pIndex)
{
+ if (pIndex == __pSelectedIndexInOmittedIndex)
+ {
+ return;
+ }
+
__pFormerIndex = __pSelectedIndexInOmittedIndex;
__pSelectedIndexInOmittedIndex = pIndex;
}
{
pSelectedIndex = pFocusedIndexView->GetOmissionIndexAtPoint(pIndex,
FloatPoint(pFocusedIndexView->GetIndexBoundsF().x, point.y));
+ if (pSelectedIndex == null)
+ {
+ pSelectedIndex = pFocusedIndexView->GetSelectedIndexInOmittedIndex();
+ }
}
pFocusedIndexView->SetSelectedIndexInOmittedIndex(pSelectedIndex);
else
{
pSelectedIndex = pFocusedIndexView->GetSelectedIndex();
+ if (pSelectedIndex && pSelectedIndex->GetOmitted() == true)
+ {
+ pSelectedIndex = pFocusedIndexView->GetSelectedIndexInOmittedIndex();
+ }
selectedIndexLevel = __focusedIndexLevel;
}
}