Corretta gestione righe disabilitate degli sheet
git-svn-id: svn://10.65.10.50/trunk@3179 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
01ed9cb6c4
commit
d3ccbe4673
@ -3589,7 +3589,7 @@ void TForm::arrange_form()
|
||||
FILE* lpt = fopen(device,"w");
|
||||
|
||||
if (lpt == NULL)
|
||||
fatal_box("Non rieso ad aprire il device %s.",device);
|
||||
fatal_box("Impossibile aprire il device %s.",device);
|
||||
#endif
|
||||
|
||||
// _ipy viene assunto uguale per entrambi i posizionamneti
|
||||
@ -3619,7 +3619,7 @@ void TForm::arrange_form()
|
||||
SpoolRow((char *)(const char *) str_pos, str_pos.len());
|
||||
#else
|
||||
lpt = fopen(device,"w");
|
||||
if (lpt == NULL) fatal_box("Non riesco ad aprire il device %s.",device);
|
||||
if (lpt == NULL) fatal_box("Impossibile aprire il device %s.",device);
|
||||
// fprintf(lpt,"%s",(const char*) bspc);
|
||||
fprintf(lpt,"%s\r",(const char*) str_pos);
|
||||
fflush(lpt);
|
||||
|
@ -490,7 +490,7 @@ bool TMask_field::on_hit()
|
||||
bool TMask_field::on_key(KEY key)
|
||||
{
|
||||
#ifdef DBG
|
||||
if (key > K_CTRL)
|
||||
if (key > (K_CTRL+K_SPACE))
|
||||
return error_box("Tasto ignorato %d", key);
|
||||
#endif
|
||||
|
||||
|
@ -570,7 +570,17 @@ bool TSheet_control::event_handler(XI_OBJ* itf, XI_EVENT *xiev)
|
||||
{
|
||||
const long rec = row2rec(xiev->v.xi_obj->v.row);
|
||||
if (_disabled[rec])
|
||||
{
|
||||
refused = TRUE;
|
||||
// Cerca la prossima riga abilitata e valida
|
||||
const int dir = rec > selected() ? +1: -1;
|
||||
const long max = items();
|
||||
for (long r = rec+dir; r >= 0 && r < max; r += dir) if (!_disabled[r])
|
||||
{
|
||||
_sheet->post_select(r);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
if (_sheet->_select_row < 0)
|
||||
make_current(rec);
|
||||
|
Loading…
x
Reference in New Issue
Block a user