fix NextRow markers accumulate when a row is reloaded

This commit is contained in:
Chris Danford
2006-02-22 18:12:45 +00:00
parent 071558697b
commit 06b19345a9
+8
View File
@@ -183,6 +183,14 @@ void OptionRow::ChoicesChanged()
{
ASSERT( !m_pHand->m_Def.m_vsChoices.empty() );
// Remove the NextRow marker before reloading choices
if( m_pHand->m_Def.m_vsChoices[0] == NEXT_ROW_NAME )
{
m_pHand->m_Def.m_vsChoices.erase( m_pHand->m_Def.m_vsChoices.begin() );
FOREACH_PlayerNumber( p )
m_vbSelected[p].erase( m_vbSelected[p].begin() );
}
FOREACH_PlayerNumber( p )
{
vector<bool> &vbSelected = m_vbSelected[p];