Patch level : 12.0 856

Files correlati     : fp0.exe
Commento            : Bloccata selezione multipla per contabilizzazione
This commit is contained in:
Simone Palacino 2019-07-15 11:06:12 +02:00
parent 1626bfac14
commit f6552469ca

View File

@ -82,6 +82,8 @@ protected:
static bool causfa_handler(TMask_field& f, KEY k);
void fattsel(int dlg, TField_event& e);
// Non permette la selezione multipla delle righe
void sel();
bool on_field_event(TOperable_field& o, TField_event e, long jolly) override;
void check_buttons(int p);
void next_page(int p) override;
@ -1031,21 +1033,33 @@ void TPassive_mask::fattsel(const int dlg, TField_event& e)
field(F_DATAENDREG).enable(get_bool(F_CONTABIL));
}
void TPassive_mask::sel()
{
TSheet_field& sf = sfield(F_DOCS);
FOR_EACH_SHEET_ROW(sf, nr, row)
{
if (*row->get(0) == 'X') {
row->add("", 0);
break;
}
}
sf.force_update();
}
bool TPassive_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
{
switch (o.dlg())
{
case S_SELCODPROT:
if(e == fe_modify)
if (e == fe_modify) {
set_filter_changed();
sel();
}
break;
case F_PROT:
if(e == fe_init)
init();
break;
case F_DOCS:
if (e == se_query_modify)
break;
case DLG_USER:
if (e == fe_button && jolly > 0 && get_fattsel() == FILTER_CONT)
{
@ -1222,9 +1236,7 @@ void TPassive_app::main_loop()
TPassive_mask mask(check_f1());
load_mask(mask);
mask.first_focus(F_DATAINI);
while(mask.run() == K_ENTER)
{
}
while (mask.run() == K_ENTER) {}
save_field(mask);
}