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;