Patch level : 12.0

Files correlati     :

NO patch
Modifica per la ricompilazione

git-svn-id: svn://10.65.10.50/branches/R_10_00@23984 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
bonazzi 2017-07-21 20:27:58 +00:00
parent 2965c3ae1a
commit 43ea59bf47

View File

@ -123,7 +123,7 @@ public:
virtual TRelation* get_relation() const { return _rel; }
virtual bool get_next_key(TToken_string& key);
virtual bool has_filtered_cursor() const { return true; }
virtual TCursor& get_filtered_cursor() const;
virtual TCursor * get_filtered_cursor() const;
virtual void init_insert_mode(TMask& m);
virtual void init_modify_mode(TMask& m);
@ -1289,9 +1289,9 @@ TPreventivo_emsk::TPreventivo_emsk() : TPreventivo_msk("pe1400b"), _tree(NULL),
}
short idcdc = 0, idcms = 0, idfase = 0, idconto = 0;
ca_create_fields_ext(*this, 0, 2, yca, F_CDC0+1, idcdc, idcms, idfase, idconto,
DOC_CODCOSTO, DOC_CODCMS, NULL); // Niente fasi qui!
ca_create_fields_ext(*this, 0, 2, yca, F_CDC0+1, idcdc, idcms, idfase, idconto,
DOC_CODCOSTO, DOC_CODCMS, NULL); // Niente fasi qui!
set_sheet_color(F_DISTINTE, COLOR_YELLOW);
set_sheet_color(F_ARTICOLI, COLOR_GREEN);
set_sheet_color(F_MISURE, COLOR_GRAY);
@ -1345,11 +1345,11 @@ bool TPreventivo_app::user_destroy()
return true;
}
TCursor& TPreventivo_app::get_filtered_cursor() const
TCursor * TPreventivo_app::get_filtered_cursor() const
{
TEdit_field& f = _qmsk->efield(F_NDOC);
TCursor& cur = *f.browse()->cursor();
if (cur.items() == 0) // A volte deve scantarsi ...
TCursor * cur = f.browse()->cursor();
if (cur->items() == 0) // A volte deve scantarsi ...
f.check(); // ... forzo ricalcolo elementi
return cur;
}
@ -1369,14 +1369,18 @@ bool TPreventivo_app::get_next_key(TToken_string& key)
if (m.query_mode() || revlen == 0)
{
TCursor& cur = get_filtered_cursor();
const TRecnotype i = cur.items();
if (i > 0)
{
cur = i-1;
ndoc = cur.curr().get_long(DOC_NDOC);
m.split_ndoc(ndoc, nprev, nrev);
}
TCursor * cur = get_filtered_cursor();
if (cur != NULL)
{
const TRecnotype i = cur->items();
if (i > 0)
{
*cur = i-1;
ndoc = cur->curr().get_long(DOC_NDOC);
m.split_ndoc(ndoc, nprev, nrev);
}
}
nprev++;
nrev = 1;
m.join_ndoc(nprev, nrev, ndoc);