diff --git a/include/maskfld.cpp b/include/maskfld.cpp index 20c3f5b0f..1a645ce32 100755 --- a/include/maskfld.cpp +++ b/include/maskfld.cpp @@ -525,7 +525,7 @@ void TMask_field::set_prompt(const char* p) void TMask_field::set(const char* s) -{ +{ if (mask().is_running()) { set_window_data(s); diff --git a/include/msksheet.cpp b/include/msksheet.cpp index 6578cd329..2f1e4cd64 100755 --- a/include/msksheet.cpp +++ b/include/msksheet.cpp @@ -386,10 +386,14 @@ void TSpreadsheet::update_rec(int rec) { const int riga = rec2row(rec); if (riga >= 0) - { + { + if (rec == selected()) + xi_set_focus(_itf); XI_OBJ row; XI_MAKE_ROW(&row, _list, riga); xi_cell_request(&row); // Update internal values + if (rec == selected()/* && _cur_col > 0*/) + set_focus_cell(riga, _cur_col); } } @@ -399,6 +403,8 @@ void TSpreadsheet::set_focus_cell(int riga, int colonna) xvt_scr_set_focus_vobj(win()); const int r = row2rec(riga); + if (colonna <= 0) colonna = 1; + for (; colonna < _columns; colonna++) if (!cell_disabled(r, colonna-1)) break;