diff --git a/src/ci/ci2200.cpp b/src/ci/ci2200.cpp index ab1ccab94..4e7a26903 100755 --- a/src/ci/ci2200.cpp +++ b/src/ci/ci2200.cpp @@ -1410,7 +1410,13 @@ bool TRilevamento_cons_msk::on_field_event(TOperable_field& f, TField_event e, l case F_ANNO: case F_MESE: if (e == fe_modify) + { + update_tree(); + reset(F_GIORNO); + ((TRil_tree *)tfield(F_CALENDARIO).tree())->reset_curr_period(); + tfield(F_CALENDARIO).force_update(); + } break; case F_CDC1: case F_CDC2: @@ -1440,13 +1446,21 @@ bool TRilevamento_cons_msk::on_field_event(TOperable_field& f, TField_event e, l const TString & dett = get(F_INTERVALLO); if (dett == "A") - _anno = atoi(*((TString *) ((TRil_tree *) tfield(F_CALENDARIO).tree())->curr_node())); + { + _anno = atoi(*((TString *)((TRil_tree *)tfield(F_CALENDARIO).tree())->curr_node())); + set(F_ANNO, _anno); + } else if (dett == "M") - _mese = ((TRil_tree *) tfield(F_CALENDARIO).tree())->pos() + 1; + { + _mese = ((TRil_tree *)tfield(F_CALENDARIO).tree())->pos() + 1; + set(F_MESE, _mese); + } else - _giorno = atoi(*((TString *) ((TRil_tree *) tfield(F_CALENDARIO).tree())->curr_node())); - set(F_GIORNO, _giorno); + { + _giorno = atoi(*((TString *)((TRil_tree *)tfield(F_CALENDARIO).tree())->curr_node())); + set(F_GIORNO, _giorno); + } ((TRil_tree *)tfield(F_CALENDARIO).tree())->set_curr_period(); tfield(F_CALENDARIO).force_update(); riempi_sheet(); @@ -1469,24 +1483,30 @@ bool TRilevamento_cons_msk::on_field_event(TOperable_field& f, TField_event e, l if (dett == "A") { - hide(F_ANNO); + disable(F_ANNO); hide(F_MESE); hide(F_GIORNO); + reset(F_ANNO); } else if (dett == "M") { - show(F_ANNO); - hide(F_MESE); + enable(F_ANNO); + disable(F_MESE); + show(F_MESE); hide(F_GIORNO); + reset(F_MESE); } else { - show(F_ANNO); + enable(F_ANNO); show(F_MESE); + enable(F_MESE); show(F_GIORNO); + reset(F_GIORNO); } ((TRil_tree *)tfield(F_CALENDARIO).tree())->reset_curr_period(); + tfield(F_CALENDARIO).force_update(); update_tree(); riempi_sheet(); }