Patch level :2.2 186

Files correlati     :
Ricompilazione Demo : [ ]
Commento            :riporto dalla 2.1 di maskfld.cpp (vedi patch at0156) e correzione su msksheet.cpp di un warning (da int a bool il tipo di una variabile)


git-svn-id: svn://10.65.10.50/trunk@13404 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
luca 2005-10-10 12:54:00 +00:00
parent 065ce112d4
commit 3a0ffc2b70
2 changed files with 13 additions and 9 deletions

View File

@ -206,9 +206,9 @@ void TMask_field::set_justify(bool r)
void TMask_field::set_read_only(bool r)
{
_flags.read_only = r;
_flags.read_only = r && !in_key(1);
if (_ctl)
_ctl->read_only(r);
_ctl->read_only(_flags.read_only);
}
// @doc INTERNAL
@ -3392,13 +3392,17 @@ void TEdit_field::set_read_only(bool r)
if (r != read_only())
{
TMask_field::set_read_only(r);
set_background();
if (_browse && _browse->is_browse())
const bool ok = r == read_only();
if (ok)
{
TToken_string out_ids(((TBrowse *)_browse)->get_output_fields());
TMask & m = mask();
FOR_EACH_TOKEN(out_ids, fld)
m.field(atoi(fld)).set_read_only(r);
set_background();
if (_browse && _browse->is_browse())
{
TToken_string out_ids(((TBrowse *)_browse)->get_output_fields());
TMask & m = mask();
FOR_EACH_TOKEN(out_ids, fld)
m.field(atoi(fld)).set_read_only(r);
}
}
}
}

View File

@ -2388,7 +2388,7 @@ bool TSpreadsheet::notify(int rec, KEY k)
const bool ok = _notify ? _notify(owner(), rec, k) : TRUE;
if (k == K_ENTER)
{
int cell_dirty = _cell_dirty; // preservato lo stato di cell_dirty
const bool cell_dirty = _cell_dirty; // preservato lo stato di cell_dirty
set_dirty(ok ? 1 : 3);
_cell_dirty = cell_dirty;
}