Correzioni ai registri

git-svn-id: svn://10.65.10.50/trunk@1439 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
nik 1995-06-05 13:44:22 +00:00
parent 19da1c20c5
commit a9ce519d38

View File

@ -530,9 +530,7 @@ bool CG4400_application::to_ditt_handler(TMask_field& f, KEY key)
{ {
TMask& m = f.mask(); TMask& m = f.mask();
if (key == K_F9) if (key == K_F9)
{
app().to_butt_handler(m.field(BUT_DTO), K_SPACE); app().to_butt_handler(m.field(BUT_DTO), K_SPACE);
}
if (key == K_TAB && f.focusdirty()) if (key == K_TAB && f.focusdirty())
{ {
const long l = app().select_firm_range(m.get_long(DA_CODICE), m.get_long(A_CODICE)); const long l = app().select_firm_range(m.get_long(DA_CODICE), m.get_long(A_CODICE));
@ -546,14 +544,12 @@ bool CG4400_application::fr_ditt_handler(TMask_field& f, KEY key)
{ {
TMask& m = f.mask(); TMask& m = f.mask();
if (key == K_F9) if (key == K_F9)
{
app().fr_butt_handler(m.field(BUT_DFR), K_SPACE); app().fr_butt_handler(m.field(BUT_DFR), K_SPACE);
}
else if (key == K_TAB && f.focusdirty()) else if (key == K_TAB && f.focusdirty())
{ {
const long l = app().select_firm_range(m.get_long(DA_CODICE), m.get_long(A_CODICE)); const long l = app().select_firm_range(m.get_long(DA_CODICE), m.get_long(A_CODICE));
app().set_choice_limits(m); app().set_choice_limits(m);
m.field(F_SELECT).set(format("%ld", l)); m.field(F_SELECT).set(format("%ld", l));
} }
return TRUE; return TRUE;
} }
@ -569,7 +565,7 @@ bool CG4400_application::to_butt_handler(TMask_field& f, KEY key)
if (sh->run() == K_ENTER) if (sh->run() == K_ENTER)
{ {
app().select_firm_range(m.get_long(DA_CODICE),sh->row(sh->selected()).get_long(1)); app().select_firm_range(m.get_long(DA_CODICE),sh->row(sh->selected()).get_long(1));
app().set_choice_limits(m); app().set_choice_limits(m);
} }
} }
return TRUE; return TRUE;
@ -607,6 +603,10 @@ void CG4400_application::set_choice_limits(TMask& m)
if (first != -1) m.field(DA_CODICE).set(format("%ld",first)); if (first != -1) m.field(DA_CODICE).set(format("%ld",first));
if (last != -1) m.field(A_CODICE).set(format("%ld",last)); if (last != -1) m.field(A_CODICE).set(format("%ld",last));
m.set(F_SELECT, _selected.ones()); m.set(F_SELECT, _selected.ones());
//modifica del 02/06/1995
if (m.is_running())
if (first != -1l) app().set_firm(first);
//fine
} }
long CG4400_application::select_firm_range(long from, long to) long CG4400_application::select_firm_range(long from, long to)