Patch level : 10.0
Files correlati : lv3.exe Ricompilazione Demo : [ ] Commento : Corretta gestione colorazione righe in base a formule git-svn-id: svn://10.65.10.50/trunk@18377 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
86d861c892
commit
33eac8a89d
include
@ -1099,13 +1099,13 @@ bool TSpreadsheet::event_handler(XI_OBJ* itf, XI_EVENT *xiev)
|
||||
break;
|
||||
case XIE_CELL_REQUEST:
|
||||
{
|
||||
const long rec = xiev->v.cell_request.rec;
|
||||
const int maxlen = xiev->v.cell_request.len;
|
||||
const long& rec = xiev->v.cell_request.rec;
|
||||
const short& maxlen = xiev->v.cell_request.len;
|
||||
|
||||
const char* src = NULL;
|
||||
int nm;
|
||||
XI_OBJ** obj = xi_get_member_list(xiev->v.cell_request.list, &nm);
|
||||
const int num = xiev->v.cell_request.col_nbr;
|
||||
const short& num = xiev->v.cell_request.col_nbr;
|
||||
const int cid = obj[num]->cid;
|
||||
|
||||
if (cid >= FIRST_FIELD)
|
||||
@ -1114,10 +1114,10 @@ bool TSpreadsheet::event_handler(XI_OBJ* itf, XI_EVENT *xiev)
|
||||
{
|
||||
const int col = cid - FIRST_FIELD;
|
||||
const int curr = _cur_rec;
|
||||
_cur_rec = rec;
|
||||
_cur_rec = rec; // Memorizzo il record corrente per calcolare il campo correttamente
|
||||
const TOperable_field* f = field(cid);
|
||||
_cur_rec = curr;
|
||||
if (f)
|
||||
_cur_rec = curr; // Lo ripristino dopo il calcolo
|
||||
if (f != NULL && f->is_editable())
|
||||
{
|
||||
const TEditable_field* e = (const TEditable_field*)f;
|
||||
TToken_string& rowrec = row(rec);
|
||||
@ -1175,15 +1175,13 @@ bool TSpreadsheet::event_handler(XI_OBJ* itf, XI_EVENT *xiev)
|
||||
else
|
||||
{
|
||||
// Non impostare il colore per la cella correntemente col focus
|
||||
if (xiev->v.cell_request.rec != _cur_rec && xiev->v.cell_request.col_nbr != _cur_col)
|
||||
if (rec != _cur_rec || num != _cur_col)
|
||||
{
|
||||
const bool bfc = get_back_and_fore_color(xiev->v.cell_request.back_color,
|
||||
xiev->v.cell_request.color, rec, col);
|
||||
if (!bfc && f->required())
|
||||
{
|
||||
if (f->required())
|
||||
xiev->v.cell_request.back_color = REQUIRED_BACK_COLOR;
|
||||
xiev->v.cell_request.color = 0;
|
||||
}
|
||||
else
|
||||
get_back_and_fore_color(xiev->v.cell_request.back_color,
|
||||
xiev->v.cell_request.color, rec, col);
|
||||
}
|
||||
|
||||
if (e->has_query_button()) // Metto il bottone sulle celle attive
|
||||
@ -1200,6 +1198,7 @@ bool TSpreadsheet::event_handler(XI_OBJ* itf, XI_EVENT *xiev)
|
||||
{
|
||||
xiev->v.cell_request.back_color = DISABLED_BACK_COLOR;
|
||||
xiev->v.cell_request.color = DISABLED_COLOR;
|
||||
xiev->v.cell_request.attrib &= ~XI_ATR_ENABLED;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -950,9 +950,13 @@ TPrefix::TPrefix() : _filelevel(0), _stdlevel(0), _items(0), _firm(NULL)
|
||||
fatal_box(FR("Percorso dati non valido: '%s'"), __ptprf);
|
||||
|
||||
const TFilename dir(prfx);
|
||||
const long primaditta = atol(dir.name());
|
||||
long primaditta = atol(dir.name());
|
||||
if (primaditta > 0L && !exist(primaditta))
|
||||
set_codditta(0L, TRUE);
|
||||
{
|
||||
TPointer_array ditte; firms(ditte);
|
||||
primaditta = ditte.empty() ? 0L : ditte.get_long(0);
|
||||
set_codditta(primaditta, TRUE);
|
||||
}
|
||||
|
||||
DB_init();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user