Descrizione da ripristinare per commit rifatto
git-svn-id: svn://10.65.10.50/trunk@4307 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
bbb94e2cbd
commit
6b2002d740
@ -696,18 +696,22 @@ int TSpreadsheet::insert(
|
||||
ininsert = TRUE;
|
||||
int r = rec < 0 ? items() : rec;
|
||||
|
||||
const bool ok = call_notify ? notify(r, K_INS) : TRUE;
|
||||
bool ok = call_notify ? notify(r, K_INS) : TRUE;
|
||||
|
||||
if (ok)
|
||||
{
|
||||
r = _str.insert(new TToken_string(80), rec);
|
||||
{
|
||||
TToken_string* toktok = new TToken_string(80);
|
||||
r = _str.insert(toktok, rec);
|
||||
|
||||
_property.insert(NULL, r);
|
||||
|
||||
// Notifica che l'inserimento e' terminato
|
||||
xi_insert_row(_obj, INT_MAX);
|
||||
owner().post_insert(r);
|
||||
|
||||
if (call_notify)
|
||||
notify(r, K_CTRL + K_INS);
|
||||
|
||||
xi_insert_row(_obj, INT_MAX);
|
||||
|
||||
if (update_sheet)
|
||||
xi_cell_request(_obj);
|
||||
@ -854,8 +858,12 @@ bool TSpreadsheet::off_cell_handler(XI_OBJ *cell)
|
||||
}
|
||||
|
||||
bool TSpreadsheet::test_focus_change()
|
||||
{
|
||||
bool ok = xi_move_focus(get_interface()) ? TRUE : FALSE;
|
||||
{
|
||||
bool ok = TRUE;
|
||||
if (_cell_dirty)
|
||||
ok = off_cell_handler();
|
||||
if (ok)
|
||||
ok = xi_move_focus(get_interface()) ? TRUE : FALSE;
|
||||
return ok;
|
||||
}
|
||||
|
||||
@ -974,7 +982,7 @@ bool TSpreadsheet::event_handler(XI_OBJ* itf, XI_EVENT *xiev)
|
||||
{
|
||||
on_idle(); // Termina tutti gli eventuali update in corso
|
||||
|
||||
if (xiev->v.xi_obj->type == XIT_CELL)
|
||||
if (xiev->v.xi_obj->type == XIT_CELL) // Bottone della cella
|
||||
{
|
||||
XI_CELL_DATA& cell = xiev->v.xi_obj->v.cell;
|
||||
int num;
|
||||
@ -990,11 +998,16 @@ bool TSpreadsheet::event_handler(XI_OBJ* itf, XI_EVENT *xiev)
|
||||
}
|
||||
}
|
||||
else
|
||||
if (xiev->v.xi_obj->type == XIT_LIST)
|
||||
{
|
||||
if (xiev->v.xi_obj->type == XIT_LIST) // Bottone dello sheet
|
||||
{
|
||||
owner().mask().notify_focus_field(owner().dlg());
|
||||
insert(-1, TRUE, TRUE);
|
||||
if (test_focus_change())
|
||||
{
|
||||
owner().mask().notify_focus_field(owner().dlg());
|
||||
insert(-1, TRUE, TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case XIE_SELECT:
|
||||
@ -1121,14 +1134,8 @@ bool TSpreadsheet::event_handler(XI_OBJ* itf, XI_EVENT *xiev)
|
||||
ok = notify(_cur_rec, K_ENTER); // Notify edit
|
||||
_row_dirty = FALSE; // Avoid double notifications!
|
||||
}
|
||||
if (ok)
|
||||
{
|
||||
//xvt_statbar_refresh();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!ok)
|
||||
refused = TRUE;
|
||||
}
|
||||
}
|
||||
if (!refused) // Notifica l'abbandono della riga
|
||||
refused = !notify(_cur_rec, K_CTRL+K_TAB);
|
||||
@ -1277,10 +1284,13 @@ bool TSpreadsheet::event_handler(XI_OBJ* itf, XI_EVENT *xiev)
|
||||
refused = TRUE;
|
||||
}
|
||||
break;
|
||||
case K_CTRL + '+':
|
||||
owner().mask().notify_focus_field(owner().dlg());
|
||||
insert(-1, TRUE, TRUE);
|
||||
refused = TRUE;
|
||||
case K_CTRL+'+':
|
||||
if (test_focus_change())
|
||||
{
|
||||
owner().mask().notify_focus_field(owner().dlg());
|
||||
insert(-1, TRUE, TRUE);
|
||||
refused = TRUE;
|
||||
}
|
||||
break;
|
||||
case K_CTRL + 'A':
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user