Patch level :

Files correlati     :
Ricompilazione Demo : [ ]
Commento            :


git-svn-id: svn://10.65.10.50/branches/R_10_00@21957 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
luca 2011-04-14 09:30:51 +00:00
parent c7d9a8ffda
commit 23298c2e15

View File

@ -187,11 +187,19 @@ static int sort_by_data(TSheet_field& s, int r1, int r2)
{
TToken_string& s1 = s.row(r1);
TToken_string& s2 = s.row(r2);
//prima ordina per data dalla piu' recente alla piu' antica..
const int datacomp_pos = s.cid2index(S_DATA);
const TDate d1 = s1.get(datacomp_pos);
const TDate d2 = s2.get(datacomp_pos);
int cmp = int(d2 - d1);
//..poi per tipo (dal vuoto in avanti
if (cmp == 0)
{
const int tipo_pos = s.cid2index(S_TIPO);
const char c1 = s1.get_char(tipo_pos);
const char c2 = s2.get_char(tipo_pos);
cmp = int (c1 - c2);
}
return cmp;
}
@ -395,6 +403,8 @@ bool TGestione_attrezzature_mask::on_field_event(TOperable_field& o, TField_even
set(F_COD_MATR, codattr.mid(15,15));
//chiede di salvare le modifiche al cambio attrezzatura
save_if_dirty();
//seleziona sull'albero
ct->select_attr(get(F_COD_ART), get(F_COD_MATR));
//riempie lo sheet
fill_sheet_storico(codattr);
}