From f0086a75effe7ae52ca34ce3221fd9eed12a83f4 Mon Sep 17 00:00:00 2001 From: Alessandro Bonazzi Date: Mon, 10 Feb 2020 20:51:34 +0100 Subject: [PATCH] Patch level : 12.0 no-patch Files correlati : Commento : Aggiunta variabile _sorted_cursor per sapere che il form ha un sorted cursor --- src/include/form.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/include/form.cpp b/src/include/form.cpp index 9049f4f5c..e13655e82 100755 --- a/src/include/form.cpp +++ b/src/include/form.cpp @@ -2639,6 +2639,7 @@ bool TForm::parse_use(TScanner& scanner, TString & filter) { TToken_string ordexpr(parse_sortexpr(scanner)); _cursor = new TSorted_cursor(_relation, ordexpr, "", key); + _sorted_cursor = true; } else { @@ -3014,8 +3015,9 @@ bool TForm::reread( // Legge le modifiche su archivio e poi e' finita. s->set_dirty(FALSE); TLocalisamfile rprof(LF_RFORM); - const char sez[3] = {sec,p+'0','\0'}; - rprof.zero(); + TString4 sez; sez << sec << p; + + rprof.zero(); rprof.put("TIPOPROF", _name); rprof.put("CODPROF", _code); rprof.put("SEZ", sez); @@ -4460,8 +4462,9 @@ bool TForm::write_profile() TPrint_section* sec = exist(sc, pt); if (sec != NULL && sec->dirty()) { - const char codsez[3] = { sc, pt+'0', '\0' }; - cur.zero(); + TString4 codsez; codsez << sc << pt; + + cur.zero(); cur.put("TIPOPROF", name()); cur.put("CODPROF", code()); cur.put("SEZ", codsez); @@ -4511,6 +4514,7 @@ void TForm::init() _msg_add_enabled = TRUE; _magic_currency = FALSE; _exchange = NULL; + _sorted_cursor = false; } // @doc EXTERNAL