From 5508bd1bc7c80896c1c0ce2034dfa9e5d0eab9db Mon Sep 17 00:00:00 2001 From: guy Date: Thu, 20 Apr 1995 08:43:28 +0000 Subject: [PATCH] Corretto mancato aggiornamento dopo edit della maschera di un sheet git-svn-id: svn://10.65.10.50/trunk@1278 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- include/msksheet.cpp | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/include/msksheet.cpp b/include/msksheet.cpp index 49d0e0fb6..a7e1313cc 100755 --- a/include/msksheet.cpp +++ b/include/msksheet.cpp @@ -10,12 +10,6 @@ const short FIRST_FIELD = 101; #include #include -extern "C" -{ -#include -} - - /////////////////////////////////////////////////////////// // TSpreadsheet /////////////////////////////////////////////////////////// @@ -213,7 +207,7 @@ TSpreadsheet::TSpreadsheet(short x, short y, short dx, short dy, 0, 0, rct.bottom-rct.top, XI_ATR_ENABLED | XI_ATR_VISIBLE, NORMAL_COLOR, NORMAL_BACK_COLOR, // normal - NORMAL_COLOR, MASK_BACK_COLOR, // disabled + NORMAL_COLOR, DISABLED_BACK_COLOR, // disabled COLOR_RED, // active LIST_CID); listdef->v.list->sizable_columns = TRUE; @@ -384,7 +378,7 @@ void TSpreadsheet::update_rec(int rec) { XI_OBJ row; XI_MAKE_ROW(&row, _list, riga); - xi_cell_request(&row); // Update internal values + xi_cell_request(&row); // Update internal values if (_update) xi_set_row_height(&row, CHARY+1); // Force row updating } @@ -420,9 +414,11 @@ void TSpreadsheet::set_focus_cell(int riga, int colonna) int TSpreadsheet::insert(int rec) -{ - const int r = _str.insert(new TToken_string(80), rec); +{ + if (items() >= 999) + return -1; + const int r = _str.insert(new TToken_string(80), rec); const bool ok = notify(r, K_INS); if (!ok) @@ -1147,7 +1143,9 @@ void TSpreadsheet::str2mask(int riga) { TMask_field& f = sheet_mask().fld(i); const short id = f.dlg(); - if (id >= FIRST_FIELD && (f.active() || f.ghost())) + if (id >= FIRST_FIELD && + f.class_id() != CLASS_BUTTON_FIELD && + (f.active() || f.ghost())) { if (f.has_check()) f.check(STARTING_CHECK); @@ -1194,9 +1192,7 @@ KEY TSpreadsheet::edit(int n, KEY tasto) if (k == K_ENTER) { -#if XVT_OS != XVT_OS_WIN mask2str(n); -#endif } else if (k == K_DEL) {