Bonazzi's advice reporting:

modifiche agli spreadsheet per il caricamento delle righe
 e l'aggiunta delle righe nll'inizio el caso non si abbia il focus;


git-svn-id: svn://10.65.10.50/trunk@4348 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
angelo 1997-05-19 15:32:14 +00:00
parent 64e9e25538
commit c6433f6e2e

View File

@ -680,15 +680,17 @@ int TSpreadsheet::insert(
// almeno 999 righe oppure se lo spreadsheet non e' attivo.
{
static bool ininsert = FALSE;
TMask & m = owner().mask();
if (ininsert || items() >= 999)
return -1;
if (rec < 0 && items() > 0 && !owner().append() )
if (m.is_running() && rec < 0 && items() > 0 && !owner().append() )
{
XI_OBJ* itf = get_interface();
XI_OBJ* focus = xi_get_focus(itf);
if (focus && focus->type == XIT_CELL)
// XI_OBJ* focus = xi_get_focus(itf);
// if (focus && focus->type == XIT_CELL)
if (m.focus_field().dlg() == owner().dlg())
rec = _cur_rec + 1;
else
rec = 0;
@ -1003,8 +1005,8 @@ bool TSpreadsheet::event_handler(XI_OBJ* itf, XI_EVENT *xiev)
{
if (test_focus_change())
{
owner().mask().notify_focus_field(owner().dlg());
insert(-1, TRUE, TRUE);
owner().mask().notify_focus_field(owner().dlg());
}
}
}
@ -1287,8 +1289,8 @@ bool TSpreadsheet::event_handler(XI_OBJ* itf, XI_EVENT *xiev)
case K_CTRL+'+':
if (test_focus_change())
{
owner().mask().notify_focus_field(owner().dlg());
insert(-1, TRUE, TRUE);
owner().mask().notify_focus_field(owner().dlg());
refused = TRUE;
}
break;