diff -r 137ebc85284b -r 1b758917cafc menufw/menufwui/mmwidgets/src/mmgrid.cpp --- a/menufw/menufwui/mmwidgets/src/mmgrid.cpp Tue May 25 12:29:32 2010 +0300 +++ b/menufw/menufwui/mmwidgets/src/mmgrid.cpp Wed Jun 09 09:29:04 2010 +0300 @@ -12,7 +12,7 @@ * Contributors: * * Description: -* Version : %version: MM_104 % << Don't touch! Updated by Synergy at check-out. +* Version : %version: MM_106 % << Don't touch! Updated by Synergy at check-out. * */ @@ -293,19 +293,19 @@ if ( CurrentItemIndex() != itemUnderPointerIndex ) { CMmWidgetContainer* parent = static_cast( Parent() ); - if ( parent->IsNoItemDragged() ) - { - if ( ItemDrawer()->Flags() & CListItemDrawer::EPressedDownState ) - { - ItemDrawer()->ClearFlags( CListItemDrawer::EPressedDownState ); - iView->DrawItem( CurrentItemIndex() ); - } - } - else - { - iView->SetCurrentItemIndex( itemUnderPointerIndex ); - iView->DrawItem(itemUnderPointerIndex); - } + if ( parent->IsNoItemDragged() ) + { + if ( ItemDrawer()->Flags() & CListItemDrawer::EPressedDownState ) + { + ItemDrawer()->ClearFlags( CListItemDrawer::EPressedDownState ); + iView->DrawItem( CurrentItemIndex() ); + } + } + else + { + iView->SetCurrentItemIndex( itemUnderPointerIndex ); + iView->DrawItem(itemUnderPointerIndex); + } } } @@ -697,12 +697,6 @@ topRow = Min( topRow, maxPossibleTopRow ); SetTopItemIndex( topRow * numOfCols ); } - else if( ( (CMmWidgetContainer* ) Parent() )->IsEditMode() - && ( Abs(maxPossibleTopRow - topRow) == 1) // prevention scrolling both scrollbar and view too much rows - && !View()->ItemIsPartiallyVisible(TopItemIndex())) // prevention scrolling view during remove item via menu - { - SetTopItemIndex( maxPossibleTopRow * numOfCols ); - } // prevent problems with view being scrolled up beyond limits if ( topRow == maxPossibleTopRow && VerticalItemOffset() < 0 ) @@ -815,6 +809,12 @@ TBool visibilityChanged = HandleScrollbarVisibilityChangeL(); if (ScrollBarFrame()->VerticalScrollBar()->IsVisible()) { + CMmWidgetContainer* widget = static_cast< CMmWidgetContainer* >(Parent()); + if( widget->IsEditMode() && widget->WidgetPositionCache().iValid ) + { + static_cast ( View() )->SetItemOffsetInPixels( + widget->WidgetPositionCache().iVerticalItemOffset ); + } CAknGrid::UpdateScrollBarsL(); } iCurrentTopItemIndex = TopItemIndex(); @@ -1017,9 +1017,9 @@ // ----------------------------------------------------------------------------- // void CMmGrid::UpdateScrollBarThumbs() - { - CAknGrid::UpdateScrollBarThumbs(); - } + { + CAknGrid::UpdateScrollBarThumbs(); + } // ----------------------------------------------------------------------------- //