diff --git a/fe/fe0100.cpp b/fe/fe0100.cpp index e2c7a7256..aecf4ec92 100755 --- a/fe/fe0100.cpp +++ b/fe/fe0100.cpp @@ -1433,6 +1433,8 @@ void TDati_rilevanti_msk::load_sheet() s.hide(); // Nascondo lo sheet per guadagnare un 20% di velocità di caricamento s.destroy(); + _mode = MODE_QUERY; + const int anno = get_int(F_ANNO); TString limit; limit << ALL_ANNO << '=' << anno; @@ -1624,7 +1626,8 @@ void TDati_rilevanti_msk::enable_buttons() one_sent = recset.move_first(); } - enable(DLG_COPY, full_rows && get_long(F_CODCF) > 0 && primo_contratto().full()); + if (id2pos(DLG_COPY) > 0) + enable(DLG_COPY, full_rows && get_long(F_CODCF) > 0 && primo_contratto().full()); enable(DLG_CANCEL, full_rows); enable(DLG_SAVEREC, _sheet_dirty); enable(DLG_EXPORT, full_rows); @@ -1863,7 +1866,7 @@ bool TDati_rilevanti_msk::on_field_event(TOperable_field& o, TField_event e, lon break; } - if (e == fe_modify && jolly == 1) + if (e == fe_modify && jolly == 1 && _mode == MODE_MOD) { const short id = o.dlg(); if (id >= A_RIGA && id < A_COFI && id != A_FORZATA)