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

@ -560,6 +560,7 @@ bool TSheet_control::event_handler(XI_OBJ* itf, XI_EVENT *xiev)
if (_disabled[rec]) if (_disabled[rec])
refused = TRUE; refused = TRUE;
else else
if (_sheet->_select_row < 0)
make_current(rec); make_current(rec);
} }
break; break;
@ -865,10 +866,15 @@ void TSheet::post_select(long rec)
void TSheet::on_idle() void TSheet::on_idle()
{ {
if (_select_row >= 0) if (_select_row >= 0)
{
const short focus_id = get_focus_id(win());
if (focus_id == 883)
{ {
_sheet->select(_select_row); _sheet->select(_select_row);
_select_row = -1;
_sheet->set_focus_rec(-1); _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) bool TBrowse_sheet::last_browse_field_handler(TMask_field& f, KEY k)
{ {
const bool ok = browse_field_handler(f, 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()); _cur_browse->post_select(_cur_browse->selected());
return ok; return ok;
} }