Corretta update degli sheet
git-svn-id: svn://10.65.10.50/trunk@1045 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
eb18a553fa
commit
698b58a6f7
@ -442,16 +442,14 @@ bool TSpreadsheet::destroy(int rec)
|
|||||||
|
|
||||||
void TSpreadsheet::update(int row)
|
void TSpreadsheet::update(int row)
|
||||||
{
|
{
|
||||||
if (_update)
|
|
||||||
{
|
|
||||||
if (row < 0)
|
if (row < 0)
|
||||||
{
|
{
|
||||||
xi_cell_request(_list); // Force updatde
|
xi_cell_request(_list); // Force updatde
|
||||||
|
if (_update)
|
||||||
xi_scroll(_list, XI_SCROLL_FIRST);
|
xi_scroll(_list, XI_SCROLL_FIRST);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
update_rec(row);
|
update_rec(row);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -668,7 +666,9 @@ void TSpreadsheet::list_handler(XI_EVENT *xiev)
|
|||||||
bool ok = sheet_mask().check_fields();
|
bool ok = sheet_mask().check_fields();
|
||||||
if (ok)
|
if (ok)
|
||||||
{
|
{
|
||||||
_update = FALSE;
|
const int next = _cur_rec + (_lastab == K_TAB ? +1 : -1);
|
||||||
|
|
||||||
|
_update = rec2row(next) >= 0;
|
||||||
mask2str(_cur_rec);
|
mask2str(_cur_rec);
|
||||||
ok = notify(_cur_rec, K_ENTER); // Notify edit
|
ok = notify(_cur_rec, K_ENTER); // Notify edit
|
||||||
_update = TRUE;
|
_update = TRUE;
|
||||||
@ -753,6 +753,12 @@ void TSpreadsheet::list_handler(XI_EVENT *xiev)
|
|||||||
case K_BTAB:
|
case K_BTAB:
|
||||||
_lastab = k;
|
_lastab = k;
|
||||||
break;
|
break;
|
||||||
|
case K_UP:
|
||||||
|
_lastab = K_BTAB;
|
||||||
|
break;
|
||||||
|
case K_DOWN:
|
||||||
|
_lastab = K_TAB;
|
||||||
|
break;
|
||||||
case K_F1:
|
case K_F1:
|
||||||
_check_enabled = FALSE; // Disable checks
|
_check_enabled = FALSE; // Disable checks
|
||||||
_edit_field->on_key(K_F1);
|
_edit_field->on_key(K_F1);
|
||||||
@ -1287,7 +1293,6 @@ TToken_string& TSheet_field::row(int n)
|
|||||||
void TSheet_field::force_update(int r)
|
void TSheet_field::force_update(int r)
|
||||||
{
|
{
|
||||||
#if XVT_OS == XVT_OS_WIN
|
#if XVT_OS == XVT_OS_WIN
|
||||||
if (_sheet->_check_enabled)
|
|
||||||
_sheet->update(r);
|
_sheet->update(r);
|
||||||
#else
|
#else
|
||||||
_sheet->open();
|
_sheet->open();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user