diff -r 2b1b11a301d2 -r 4b195f3bea29 homescreenapp/hsutils/src/hspageindicator.cpp --- a/homescreenapp/hsutils/src/hspageindicator.cpp Tue Jul 06 14:06:53 2010 +0300 +++ b/homescreenapp/hsutils/src/hspageindicator.cpp Wed Aug 18 09:40:07 2010 +0300 @@ -79,7 +79,7 @@ */ void HsPageIndicator::setActiveItemIndex(int activeItemIndex) { - if (activeItemIndex < 0 || itemCount() <= activeItemIndex) { + if (activeItemIndex < 0 || itemCount()-1 < activeItemIndex) { return; } @@ -116,13 +116,18 @@ */ void HsPageIndicator::removeItem(int activeItemIndex) { - if (activeItemIndex < 0 || itemCount() - 1 <= activeItemIndex) { + if (activeItemIndex < 0 || itemCount() <= activeItemIndex) { return; } + if (activeItemIndex == itemCount()-1) { + activeItemIndex--; + } + delete mItems.last(); mItems.removeLast(); layoutItems(); + setActiveItemIndex(activeItemIndex); }