diff --git a/src/pa/pa0100.cpp b/src/pa/pa0100.cpp index 0861048fe..f4ad4af75 100644 --- a/src/pa/pa0100.cpp +++ b/src/pa/pa0100.cpp @@ -640,17 +640,19 @@ bool TPA_mask::on_field_event(TOperable_field& o, TField_event e, long jolly) break; case DLG_ALL: { - TSheet_field& docs = sfield(F_DOCS); - TString_array& sht = docs.rows_array(); - const int items = sht.items(); - - if (items > 0) + if (e == fe_button) { - const TString4 select = *(sht.row(0).get(0)) == 'X' ? "" : "X"; - for (int i = 0; i < items; i++) - sht.row(i).add(select, 0); - docs.force_update(); - // docs.show(); + TSheet_field& docs = sfield(F_DOCS); + TString_array& sht = docs.rows_array(); + const int items = sht.items(); + + if (items > 0) + { + const TString4 select = *(sht.row(0).get(0)) == 'X' ? "" : "X"; + for (int i = 0; i < items; i++) + sht.row(i).add(select, 0); + docs.force_update(); + } } } break;