javauis/lcdui_qt/src/javax/microedition/lcdui/List.java
changeset 57 59b3b4473dc8
parent 35 85266cc22c7f
equal deleted inserted replaced
56:abc41079b313 57:59b3b4473dc8
   464      */
   464      */
   465     public void setSelectCommand(Command cmd)
   465     public void setSelectCommand(Command cmd)
   466     {
   466     {
   467         if(type == Choice.IMPLICIT)
   467         if(type == Choice.IMPLICIT)
   468         {
   468         {
   469             if(cmd != SELECT_COMMAND)
   469             if(cmd == null)
       
   470             {
       
   471             	if(selectCommand != null)
       
   472             	{
       
   473             		super.removeCommand(selectCommand);
       
   474             	}
       
   475             }
       
   476             else if(cmd != SELECT_COMMAND)
   470             {
   477             {
   471                 addCommand(cmd);
   478                 addCommand(cmd);
   472             }
   479             }
   473             selectCommand = cmd;
   480             selectCommand = cmd;
   474         }
   481         }