Select the first checked position. (fdo#31220)

The dialog appears less confusing this way.
This commit is contained in:
Kohei Yoshida 2011-03-24 01:54:19 -04:00
parent 418be7d658
commit 1bc121be4f

View file

@ -172,6 +172,7 @@ bool ScTpSubTotalGroup::DoReset( sal_uInt16 nGroupNo,
aLbGroup.SelectEntryPos( GetFieldSelPos( nField )+1 );
sal_uInt16 nFirstChecked = 0;
for ( sal_uInt16 i=0; i<nSubTotals; i++ )
{
sal_uInt16 nCheckPos = GetFieldSelPos( pSubTotals[i] );
@ -179,8 +180,12 @@ bool ScTpSubTotalGroup::DoReset( sal_uInt16 nGroupNo,
aLbColumns.CheckEntryPos( nCheckPos );
*pFunction = FuncToLbPos( pFunctions[i] );
if (i == 0 || (i > 0 && nCheckPos < nFirstChecked))
nFirstChecked = nCheckPos;
}
aLbColumns.SelectEntryPos( 0 );
// Select the first checked field from the top.
aLbColumns.SelectEntryPos(nFirstChecked);
}
else
{