Author: gs Date: Wed Nov 14 14:30:03 2007 New Revision: 42054 URL: http://svn.opensuse.org/viewcvs/yast?rev=42054&view=rev Log: don't set index in additem Modified: branches/tmp/sh/mod-ui/ncurses/src/NCComboBox.cc Modified: branches/tmp/sh/mod-ui/ncurses/src/NCComboBox.cc URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCComboBox.cc?rev=42054&r1=42053&r2=42054&view=diff ============================================================================== --- branches/tmp/sh/mod-ui/ncurses/src/NCComboBox.cc (original) +++ branches/tmp/sh/mod-ui/ncurses/src/NCComboBox.cc Wed Nov 14 14:30:03 2007 @@ -203,7 +203,6 @@ if ( item->selected() || index == -1 ) { setText( item->label() ); - index = item->index(); } } } @@ -218,14 +217,15 @@ // void NCComboBox::addItem( const string & label, bool selected ) { - YComboBox::addItem( label, selected ); - YItem * item = findItem( label ); + YItem * newItem = new YItem( label, selected ); + YUI_CHECK_NEW( newItem ); + YComboBox::addItem( newItem ); + deflist.push_back( label ); if ( selected || index == -1 ) { setText( label ); - index = item->index(); } } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org