Patch level : 12.0 no-patch

Files correlati     :
Commento            :

Aggiunta variabile _sorted_cursor per sapere che il form ha un sorted cursor
This commit is contained in:
Alessandro Bonazzi 2020-02-10 20:51:34 +01:00
parent 3e3d2838fa
commit f0086a75ef

View File

@ -2639,6 +2639,7 @@ bool TForm::parse_use(TScanner& scanner, TString & filter)
{ {
TToken_string ordexpr(parse_sortexpr(scanner)); TToken_string ordexpr(parse_sortexpr(scanner));
_cursor = new TSorted_cursor(_relation, ordexpr, "", key); _cursor = new TSorted_cursor(_relation, ordexpr, "", key);
_sorted_cursor = true;
} }
else else
{ {
@ -3014,8 +3015,9 @@ bool TForm::reread(
// Legge le modifiche su archivio e poi e' finita. // Legge le modifiche su archivio e poi e' finita.
s->set_dirty(FALSE); s->set_dirty(FALSE);
TLocalisamfile rprof(LF_RFORM); TLocalisamfile rprof(LF_RFORM);
const char sez[3] = {sec,p+'0','\0'}; TString4 sez; sez << sec << p;
rprof.zero();
rprof.zero();
rprof.put("TIPOPROF", _name); rprof.put("TIPOPROF", _name);
rprof.put("CODPROF", _code); rprof.put("CODPROF", _code);
rprof.put("SEZ", sez); rprof.put("SEZ", sez);
@ -4460,8 +4462,9 @@ bool TForm::write_profile()
TPrint_section* sec = exist(sc, pt); TPrint_section* sec = exist(sc, pt);
if (sec != NULL && sec->dirty()) if (sec != NULL && sec->dirty())
{ {
const char codsez[3] = { sc, pt+'0', '\0' }; TString4 codsez; codsez << sc << pt;
cur.zero();
cur.zero();
cur.put("TIPOPROF", name()); cur.put("TIPOPROF", name());
cur.put("CODPROF", code()); cur.put("CODPROF", code());
cur.put("SEZ", codsez); cur.put("SEZ", codsez);
@ -4511,6 +4514,7 @@ void TForm::init()
_msg_add_enabled = TRUE; _msg_add_enabled = TRUE;
_magic_currency = FALSE; _magic_currency = FALSE;
_exchange = NULL; _exchange = NULL;
_sorted_cursor = false;
} }
// @doc EXTERNAL // @doc EXTERNAL