MOdificato il meccanismo di selezione degli sheet di ricerca

git-svn-id: svn://10.65.10.50/trunk@2977 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
alex 1996-06-07 16:19:25 +00:00
parent 740550bc01
commit 07702f3328

View File

@ -334,7 +334,7 @@ void TSheet_control::make_current(long rec)
{
XI_MAKE_ROW(&o, _obj, newrow);
xi_cell_request(&o);
}
}
}
void TSheet_control::select(long rec)
@ -553,14 +553,15 @@ bool TSheet_control::event_handler(XI_OBJ* itf, XI_EVENT *xiev)
else
refused = TRUE;
}
break;
break;
case XIE_ON_ROW:
{
{
const long rec = row2rec(xiev->v.xi_obj->v.row);
if (_disabled[rec])
refused = TRUE;
else
make_current(rec);
else
if (_sheet->_select_row < 0)
make_current(rec);
}
break;
case XIE_GET_PERCENT:
@ -865,10 +866,15 @@ void TSheet::post_select(long rec)
void TSheet::on_idle()
{
if (_select_row >= 0)
{
_sheet->select(_select_row);
_select_row = -1;
_sheet->set_focus_rec(-1);
{
const short focus_id = get_focus_id(win());
if (focus_id == 883)
{
_sheet->select(_select_row);
_sheet->set_focus_rec(-1);
_select_row = -1;
}
}
}
@ -1042,7 +1048,7 @@ bool TBrowse_sheet::browse_field_handler(TMask_field& f, KEY k)
bool TBrowse_sheet::last_browse_field_handler(TMask_field& f, KEY k)
{
const bool ok = browse_field_handler(f, k);
if (ok && k == K_TAB)
if (ok && k == K_TAB && f.focusdirty())
_cur_browse->post_select(_cur_browse->selected());
return ok;
}