msksheet.cpp Corrette ricerche

relation.cpp   Corrtto congelamento


git-svn-id: svn://10.65.10.50/trunk@3316 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 1996-08-01 15:55:23 +00:00
parent 161a3afc0f
commit f861502e4a
2 changed files with 29 additions and 23 deletions

View File

@ -857,27 +857,32 @@ bool TSpreadsheet::event_handler(XI_OBJ* itf, XI_EVENT *xiev)
} }
break; break;
case XIE_BUTTON: case XIE_BUTTON:
if (xiev->v.xi_obj->type == XIT_CELL) if (_check_enabled)
{ {
XI_CELL_DATA& cell = xiev->v.xi_obj->v.cell; on_idle(); // Termina tutti gli eventuali update in corso
int num;
XI_OBJ** column = xi_get_member_list(_obj, &num); if (xiev->v.xi_obj->type == XIT_CELL)
CHECK(cell.column < num, "Bad column"); {
int rec = cell.row; XI_CELL_DATA& cell = xiev->v.xi_obj->v.cell;
rec = row2rec(rec); int num;
const int col = column[cell.column]->cid - FIRST_FIELD; XI_OBJ** column = xi_get_member_list(_obj, &num);
if (!cell_disabled(rec, col)) CHECK(cell.column < num, "Bad column");
{ int rec = cell.row;
if (xi_move_focus(xiev->v.xi_obj)) rec = row2rec(rec);
dispatch_e_char(parent(), K_F9); const int col = column[cell.column]->cid - FIRST_FIELD;
} if (!cell_disabled(rec, col))
} {
else if (xi_move_focus(xiev->v.xi_obj))
if (xiev->v.xi_obj->type == XIT_LIST) dispatch_e_char(parent(), K_F9);
{ }
owner().mask().notify_focus_field(owner().dlg());
insert(-1);
} }
else
if (xiev->v.xi_obj->type == XIT_LIST)
{
owner().mask().notify_focus_field(owner().dlg());
insert(-1);
}
}
break; break;
case XIE_SELECT: case XIE_SELECT:
if (xiev->v.xi_obj->type == XIT_ROW) if (xiev->v.xi_obj->type == XIT_ROW)
@ -1387,7 +1392,7 @@ void TSpreadsheet::mask2str(int rec)
// Certified 50% // Certified 50%
// @doc INTERNAL // @doc INTERNAL
// @mfunc Permette di abilitare/disabilitare una singola cella // @mfunc Permette di abilitare/disabilitare una singola cella
void TSpreadsheet::enable_cell( void TSpreadsheet::enable_cell(
int row, // @parm Riga della cella da abilitare/disabilitare int row, // @parm Riga della cella da abilitare/disabilitare

View File

@ -1078,8 +1078,6 @@ void TCursor::filter(
// @comm ATTENZIONE: non e' possibile filtrare un cursore congelato // @comm ATTENZIONE: non e' possibile filtrare un cursore congelato
{ {
CHECK(!_frozen, "Impossibile filtrare un cursore congelato");
TString kf(_keyfrom), kto(_keyto); TString kf(_keyfrom), kto(_keyto);
const bool filterchanged = (fil != NULL) && (_filter != fil); const bool filterchanged = (fil != NULL) && (_filter != fil);
@ -1104,9 +1102,12 @@ void TCursor::filter(
if (filterchanged || (_keyfrom != kf) || (_keyto != kto)) if (filterchanged || (_keyfrom != kf) || (_keyto != kto))
{ {
CHECK(!frozen(), "Impossibile filtrare un cursore congelato");
_pos = 0; _pos = 0;
_totrec = 0; _totrec = 0;
_lastrec = 0; _lastrec = 0;
if (filterchanged) if (filterchanged)
{ {
_filter = fil; _filter = fil;