Patch level :4.0 799
Files correlati :cg2.exe sc0.exe Ricompilazione Demo : [ ] Commento :riportate correzioni sul saldaconto dalla 3.1 git-svn-id: svn://10.65.10.50/trunk@15694 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
8679571d1a
commit
17b6eed969
@ -1815,20 +1815,25 @@ static int sort_games_date(const TObject** o1, const TObject** o2)
|
||||
void TGame_mask::sort_partite()
|
||||
{
|
||||
TString_array& a = partite().rows_array();
|
||||
const int last = a.last();
|
||||
if (last > 1)
|
||||
|
||||
// Elimina riga saldo se presente
|
||||
int last = a.last();
|
||||
if (last > 0 && a.row(last).get_int(0) == 0) // Se l'anno dell'ultima riga e' nullo ...
|
||||
a.destroy(last--); // ... elimina riga saldo
|
||||
|
||||
// Ordina lista se necessario (ci sono almeno due partite)
|
||||
if (last > 0)
|
||||
{
|
||||
if (a.row(last).get_int(0) == 0) // Se non c'e' l'anno ...
|
||||
a.destroy(last); // ... elimina riga saldo
|
||||
switch (get(P_SORT)[0])
|
||||
{
|
||||
case 'N': a.TArray::sort(sort_games_num); break; // Ordine numerico
|
||||
case 'D': a.TArray::sort(sort_games_date); break; // Ordine per data
|
||||
default : a.sort(); break; // Ordine alfabetico
|
||||
}
|
||||
update_saldo_clifo(); // Ricrea riga saldo
|
||||
partite().force_update(); // Aggiorna lo spreadsheet
|
||||
update_saldo_clifo(); // Ricrea riga saldo
|
||||
}
|
||||
|
||||
partite().force_update(); // Aggiorna lo spreadsheet
|
||||
}
|
||||
|
||||
void TGame_mask::fill_partite()
|
||||
@ -1854,7 +1859,7 @@ void TGame_mask::fill_partite()
|
||||
bool u = (k.tipo() > ' ' && k.sottoconto() == conto().sottoconto()) || k == conto();
|
||||
|
||||
if (u && !all && gioco->chiusa() && gioco->mov2rig(_numreg, _numrig) <= 0)
|
||||
u = FALSE;
|
||||
u = false;
|
||||
|
||||
if (u)
|
||||
update_partita(*gioco, -1);
|
||||
@ -1895,7 +1900,7 @@ void TGame_mask::fill_partite()
|
||||
sort_partite();
|
||||
aggiorna_residuo();
|
||||
|
||||
if (a.items() > 1)
|
||||
if (!a.empty())
|
||||
{
|
||||
_riga_partite = -1;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user