Corretta gestione E_FOCUS

git-svn-id: svn://10.65.10.50/trunk@2171 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 1995-11-18 11:09:38 +00:00
parent 30314e7e70
commit 94ae539786

View File

@ -547,9 +547,11 @@ void TSpreadsheet::update_rec(int rec)
// La prima cella utilizzabile ha indice 1
int TSpreadsheet::find_enabled_column(int rec, int colonna) const
{
if (colonna <= 0) colonna = 1;
const int last = _columns - 1;
if (colonna <= 0 || colonna > last)
colonna = 1;
for (int c = colonna-1; c < last; c++)
if (!cell_disabled(rec, c))
return c+1;
@ -1011,10 +1013,10 @@ void TSpreadsheet::list_handler(XI_EVENT *xiev)
switch (ep->type)
{
case E_FOCUS:
if (_check_enabled && ep->v.active == FALSE && mask().is_running())
if (_check_enabled && ep->v.active == FALSE)
{
const bool ok = (bool)xi_move_focus(_itf);
if (!ok)
if (!ok && mask().is_running())
{
set_dirty(3);
xiev->refused = TRUE;