From 9f0bd9be08b365c9dfa5f758d598ea6a6d498ea4 Mon Sep 17 00:00:00 2001 From: alex Date: Thu, 15 Apr 2010 23:06:48 +0000 Subject: [PATCH] Patch level : 10.0 706 Files correlati : VE2.exe Ricompilazione Demo : [ ] Commento : corretta generazione ordinata della descrizione sui codici guidati git-svn-id: svn://10.65.10.50/trunk@20346 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- ve/ve2401.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ve/ve2401.cpp b/ve/ve2401.cpp index 30946bcdf..64c7f6fec 100755 --- a/ve/ve2401.cpp +++ b/ve/ve2401.cpp @@ -216,7 +216,7 @@ bool TCodart_mask::build_children() return id2pos(102) > 0; } -TCodart_mask::TCodart_mask() : TAutomask(TR("Articolo guidato"), 1, 78, 17) +TCodart_mask::TCodart_mask() : TAutomask(TR("Articolo guidato"), 1, 78, 21) { add_button(DLG_OK, 0, "", -12, -1, 10, 2); add_button(DLG_CANCEL, 0, "", -22, -1, 10, 2); @@ -249,11 +249,15 @@ bool advanced_codart_ask(TString& code, TString& desc) order[el] = m.get_descr_order(el); code << m.get(id); } + const bool add_des = m.add_descr(); + const int start_id = add_des ? 101 : 102; + + if (!add_des) + elements--; while (elements-- > 0) { int ord = 1000; int el = -1; - const int start_id = m.add_descr() ? 101 : 102; for (id = start_id; m.id2pos(id) >= 0; id++) { @@ -267,7 +271,7 @@ bool advanced_codart_ask(TString& code, TString& desc) { const int dlg = el + 101; order[el] = 1001; - if (dlg > start_id) + if (desc.full()) desc << m.get_descr_separator(el); if (dlg >= start_id) desc << esc(m.get(dlg + 100));