diff -r 71da52165949 -r ce1c7ad1f18b photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandleraiwbase.cpp --- a/photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandleraiwbase.cpp Fri Mar 12 15:42:44 2010 +0200 +++ b/photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandleraiwbase.cpp Mon Mar 15 12:40:30 2010 +0200 @@ -381,14 +381,16 @@ if ( mediaList.SelectionCount() == 0 ) { // No items in selection list. Check if focus item is static + // When image opened from image viewer, metadata will not + // available immediately and Uri for that item will be null, + // so need to disable aiw commands at that time. Once metadata + // been filled, aiw commands should available. TInt focusIndex = mediaList.FocusIndex(); - if(focusIndex != KErrNotFound) - { - if (!mediaList.Item(focusIndex).IsStatic()) + if((mediaList.FocusIndex()!=KErrNotFound)&& + (mediaList.Item(focusIndex).Uri()!=KNullDesC)&& + (!mediaList.Item(focusIndex).IsStatic())) { - // Not static - so enable enabled = ETrue; - } } } else if ( mediaList.SelectionCount() <= MaxSelectedItems() )