In combobox values are repeatedly added

Bug #1323554 reported by binaryshadow
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ggoban
New
Undecided
Unassigned

Bug Description

In function GamePropertiesDialog::SetComputerGame values in m_combo_black and m_combo_whete are repeatedly added when restarting new game.

Curent code:
    if(m_computer){
        for(int level=0; level<11;++level){
            m_combo_black.append_text(ustring::compose(_("Gnugo level %1"),level));
            m_combo_white.append_text(ustring::compose(_("Gnugo level %1"),level));
        }

New right code:
    if(m_computer){
        m_combo_black.clear_items();
        m_combo_white.clear_items();
        for(int level=0; level<11;++level){
            m_combo_black.append_text(ustring::compose(_("Gnugo level %1"),level));
            m_combo_white.append_text(ustring::compose(_("Gnugo level %1"),level));
        }

Tags: combo
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.