diff -r 2455ef1f5bbc -r d5e927d5853b javauis/lcdui_akn/lcdui/src/CMIDForm.cpp --- a/javauis/lcdui_akn/lcdui/src/CMIDForm.cpp Wed Sep 01 12:33:18 2010 +0100 +++ b/javauis/lcdui_akn/lcdui/src/CMIDForm.cpp Tue Sep 14 21:06:50 2010 +0300 @@ -2072,7 +2072,8 @@ CMIDForm::CMIDForm(MMIDEnv& aEnv, CMIDDisplayable& aDisplayable) : iDisplayable(aDisplayable), iEnv(&aEnv), iFocused(KErrNotFound), iInitialAlignment(MMIDItem::ELeft), iHasScrolled(EFalse), - iLastFadeMessage(0) + iLastFadeMessage(0), + iLastPointedControl(KErrNotFound) { } @@ -3378,6 +3379,12 @@ // add any additional row breaks if needed InsertNewlinesL(NumNewLinesAfter(ci), &ci); } + + // Restore pointed control + if (iLastPointedControl != KErrNotFound) + { + iPointedControl = &ControlItem(iLastPointedControl); + } } /** Return true if the item is an unconstrained string item, false otherwise */ @@ -3730,6 +3737,13 @@ // CMIDForm::HandleHighlightTimer or // in CMIDForm::HandlePhysicsPointerEventL), // iPointedControl must be set to NULL. + if (iPointedControl) + { + // Store the index to last poited control. It will + // be restored after item are placed to new rows + // (see CMIDForm::AssignItemsToRowsL). + iLastPointedControl = ItemIndex(*iPointedControl); + } iPointedControl = NULL; for (TInt i=0; i < iRows.Count(); i++)