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));