After Reload, don't keep the old focus around; our items

have changed and there's not necessarily any corrolation
between the old and the new.  Connecting those is up to
export/import.  (nudging Reload together with LoadNormal
and AfterImportOptions, the logic duplication is confusing)
This commit is contained in:
Glenn Maynard
2006-01-18 04:12:59 +00:00
parent 31fdeeb3a1
commit 40eacaa61d
+10 -10
View File
@@ -924,22 +924,22 @@ void OptionRow::Reload()
ImportOptions( vpns );
switch( m_pHand->m_Def.m_selectType )
FOREACH_HumanPlayer( p )
{
case SELECT_ONE:
FOREACH_HumanPlayer( p )
switch( m_pHand->m_Def.m_selectType )
{
case SELECT_ONE:
m_iChoiceInRowWithFocus[p] = GetOneSelection(p, true);
if( m_iChoiceInRowWithFocus[p] == -1 )
m_iChoiceInRowWithFocus[p] = 0;
break;
case SELECT_MULTIPLE:
case SELECT_NONE:
m_iChoiceInRowWithFocus[p] = 0;
break;
default:
ASSERT(0);
}
break;
case SELECT_MULTIPLE:
FOREACH_HumanPlayer( p )
CLAMP( m_iChoiceInRowWithFocus[p], 0, m_pHand->m_Def.m_vsChoices.size()-1 );
break;
default:
ASSERT(0);
}
// TODO: Nothing uses this yet and it causes skips when changing options.