From e5c0f8978b446ac1fc262573a1fa6e7d78ed9066 Mon Sep 17 00:00:00 2001 From: guy Date: Mon, 29 Aug 1994 11:22:14 +0000 Subject: [PATCH] Corretta gestione focus in uscita dalla maschero di uno sheet git-svn-id: svn://10.65.10.50/trunk@87 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- include/mask.cpp | 3 ++- include/msksheet.cpp | 12 ++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/include/mask.cpp b/include/mask.cpp index a60e7f09b..4d4b167a4 100755 --- a/include/mask.cpp +++ b/include/mask.cpp @@ -1080,7 +1080,8 @@ void TMask::send_key(KEY key, short to) const fld(pos).on_key(key); #ifdef DBG else - if (mode() != MODE_SEARCH) yesnofatal_box("Can't send key to field %d", to); + if (mode() != MODE_SEARCH) + yesnofatal_box("Can't send key %u to field %d", key, to); #endif } else diff --git a/include/msksheet.cpp b/include/msksheet.cpp index 6f4bd2ec8..6795b8e04 100755 --- a/include/msksheet.cpp +++ b/include/msksheet.cpp @@ -337,9 +337,9 @@ void TSpreadsheet::update(int row) { xi_cell_request(_list); xi_scroll(_list, XI_SCROLL_FIRST); - XI_OBJ* itf = xi_get_itf(win()); - xi_set_focus(itf); - // set_front_window(win()); + // XI_OBJ* itf = xi_get_itf(win()); + // xi_move_focus(itf); + set_front_window(win()); } else update_rec(row); @@ -397,7 +397,7 @@ break; if (cid >= FIRST_FIELD) { if (rec < items()) - { + { const int col = cid - FIRST_FIELD; TMask_field* f = field(cid); src = row(rec).get(col); // Set value for cell @@ -445,7 +445,7 @@ break; _row_dirty = TRUE; } _check_enabled = TRUE; // Enable checks - xi_set_focus(xiev->v.xi_obj); // Restore focus to cell + xi_set_focus(xiev->v.xi_obj); // Restore focus to cell } } else if (xiev->v.xi_obj->type == XIT_LIST) @@ -462,7 +462,7 @@ if (xiev->v.xi_obj->type == XIT_LIST) update_rec(_cur_row); _row_dirty = TRUE; } - xi_set_focus(xiev->v.xi_obj); + set_focus_cell(_cur_row, _cur_col); _check_enabled = TRUE; } break;