Aggiunto metodo trail nei reali per autoregolare la precisione dopo moltiplicazioni e e divisioni
git-svn-id: svn://10.65.10.50/trunk@1833 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
2749cef346
commit
2f9b35286a
@ -554,11 +554,17 @@ int TSpreadsheet::insert(
|
|||||||
// @comm Non e' possibile inserire un nuovo record nel caso nello spreadsheet vi siano
|
// @comm Non e' possibile inserire un nuovo record nel caso nello spreadsheet vi siano
|
||||||
// almeno 999 righe oppure se lo spreadsheet non e' attivo.
|
// almeno 999 righe oppure se lo spreadsheet non e' attivo.
|
||||||
{
|
{
|
||||||
|
static bool ininsert = FALSE;
|
||||||
|
|
||||||
|
if ( ininsert )
|
||||||
|
return -1;
|
||||||
|
|
||||||
if (items() >= 999 || !_active)
|
if (items() >= 999 || !_active)
|
||||||
return -1;
|
return -1;
|
||||||
if (rec < 0 && items() > 0 && !_owner->append() )
|
if (rec < 0 && items() > 0 && !_owner->append() )
|
||||||
rec = _cur_rec + 1;
|
rec = _cur_rec + 1;
|
||||||
|
|
||||||
|
ininsert = TRUE;
|
||||||
const int r = _str.insert(new TToken_string(80), rec);
|
const int r = _str.insert(new TToken_string(80), rec);
|
||||||
|
|
||||||
const bool ok = notify(r, K_INS);
|
const bool ok = notify(r, K_INS);
|
||||||
@ -573,6 +579,11 @@ int TSpreadsheet::insert(
|
|||||||
xi_insert_row(_list, INT_MAX);
|
xi_insert_row(_list, INT_MAX);
|
||||||
xi_cell_request(_list);
|
xi_cell_request(_list);
|
||||||
|
|
||||||
|
// Notifica che l'inserimento è terminato
|
||||||
|
notify( r, K_CTRL + K_INS );
|
||||||
|
ininsert = FALSE;
|
||||||
|
|
||||||
|
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -589,6 +600,12 @@ bool TSpreadsheet::destroy(
|
|||||||
// @comm Se il parametro <p rec> assume valore -1 vengono eliminate tutte le righe presenti
|
// @comm Se il parametro <p rec> assume valore -1 vengono eliminate tutte le righe presenti
|
||||||
// nello spreadsheet
|
// nello spreadsheet
|
||||||
{
|
{
|
||||||
|
static bool indestroy = FALSE;
|
||||||
|
|
||||||
|
if ( indestroy )
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
indestroy = TRUE;
|
||||||
bool ok = TRUE;
|
bool ok = TRUE;
|
||||||
|
|
||||||
if (rec < 0)
|
if (rec < 0)
|
||||||
@ -607,6 +624,9 @@ bool TSpreadsheet::destroy(
|
|||||||
if (ok && mask().is_running())
|
if (ok && mask().is_running())
|
||||||
update(-1);
|
update(-1);
|
||||||
|
|
||||||
|
// Notifica l'avvenuta cancellazione
|
||||||
|
notify( rec, K_CTRL + K_DEL );
|
||||||
|
indestroy = FALSE;
|
||||||
return ok;
|
return ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -853,6 +873,8 @@ void TSpreadsheet::list_handler(XI_EVENT *xiev)
|
|||||||
|
|
||||||
_check_enabled = TRUE;
|
_check_enabled = TRUE;
|
||||||
}
|
}
|
||||||
|
// Notifica l'abbandono della riga
|
||||||
|
notify( _cur_rec, K_CTRL + K_TAB );
|
||||||
break;
|
break;
|
||||||
case XIE_ON_CELL:
|
case XIE_ON_CELL:
|
||||||
if (_check_enabled)
|
if (_check_enabled)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user