From e6a4caa2fa6824d228b421fd43850096d94bf551 Mon Sep 17 00:00:00 2001 From: villa Date: Fri, 1 Sep 1995 10:16:30 +0000 Subject: [PATCH] Sistemazione cagatelle sheet git-svn-id: svn://10.65.10.50/trunk@1775 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- include/maskfld.cpp | 2 +- include/msksheet.cpp | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) 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;