Corretta update degli sheet

git-svn-id: svn://10.65.10.50/trunk@1045 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
pirro 1995-02-28 10:25:43 +00:00
parent eb18a553fa
commit 698b58a6f7

View File

@ -442,16 +442,14 @@ bool TSpreadsheet::destroy(int rec)
void TSpreadsheet::update(int row)
{
if (_update)
{
if (row < 0)
{
xi_cell_request(_list); // Force updatde
if (row < 0)
{
xi_cell_request(_list); // Force updatde
if (_update)
xi_scroll(_list, XI_SCROLL_FIRST);
}
else
update_rec(row);
}
}
else
update_rec(row);
}
@ -667,8 +665,10 @@ void TSpreadsheet::list_handler(XI_EVENT *xiev)
str2mask(_cur_rec); // It shouldn't have to be necessary
bool ok = sheet_mask().check_fields();
if (ok)
{
_update = FALSE;
{
const int next = _cur_rec + (_lastab == K_TAB ? +1 : -1);
_update = rec2row(next) >= 0;
mask2str(_cur_rec);
ok = notify(_cur_rec, K_ENTER); // Notify edit
_update = TRUE;
@ -753,6 +753,12 @@ void TSpreadsheet::list_handler(XI_EVENT *xiev)
case K_BTAB:
_lastab = k;
break;
case K_UP:
_lastab = K_BTAB;
break;
case K_DOWN:
_lastab = K_TAB;
break;
case K_F1:
_check_enabled = FALSE; // Disable checks
_edit_field->on_key(K_F1);
@ -1287,8 +1293,7 @@ TToken_string& TSheet_field::row(int n)
void TSheet_field::force_update(int r)
{
#if XVT_OS == XVT_OS_WIN
if (_sheet->_check_enabled)
_sheet->update(r);
_sheet->update(r);
#else
_sheet->open();
#endif