diff --git a/cg/cg0500.cpp b/cg/cg0500.cpp index 1f4a21028..5249c4b8a 100755 --- a/cg/cg0500.cpp +++ b/cg/cg0500.cpp @@ -165,6 +165,7 @@ void TCaus_app::carica_righe_libere(int from) { if (curr_mask().is_running()) ss().force_update(); + ss().select(0); _last_descr = _tipo_des; } } diff --git a/cg/cg21cg.uml b/cg/cg21cg.uml index df57ab639..59c4478ae 100755 --- a/cg/cg21cg.uml +++ b/cg/cg21cg.uml @@ -87,6 +87,7 @@ BEGIN CHECKTYPE NORMAL MESSAGE DIRTY,106|DIRTY,206|DIRTY,306 WARNING "Conto inesistente o mancante sulla riga contabile" + ADD RUN cg0 -0 END NUMBER CG_SOTTOCONTO 6 diff --git a/cg/cg5500.cpp b/cg/cg5500.cpp index fc07046b2..78954e8a4 100755 --- a/cg/cg5500.cpp +++ b/cg/cg5500.cpp @@ -134,17 +134,17 @@ void Visliq_app::build_ditte_sheet() { // build sheet _ditte->destroy(); + long prima = -1; + for (int i = 0; i < _nomiditte.items(); i++) { - TToken_string* d = new TToken_string(64); - *d = (TToken_string&)_nomiditte[i]; - const char vers = d->get_char(2); - bool selectable = vers == '?'; + TToken_string* d = new TToken_string(_nomiditte.row(i)); const long pos = _ditte->add(d); - if (selectable) - _ditte->disable_row(pos); - else - _ditte->enable_row(pos); + const char vers = d->get_char(2); + const bool selectable = vers != '?'; + _ditte->enable_row(pos, selectable); + if (selectable && prima < 0) + _ditte->select(prima = pos); } } @@ -155,7 +155,7 @@ void Visliq_app::reset_fields() } bool Visliq_app::select_butt(TMask& m) -{ +{ if (_ditte->run() == K_ENTER) { TToken_string& row = _ditte->row(_ditte->selected()); diff --git a/cg/cg5500.h b/cg/cg5500.h index b4bc9f01e..85d20e2dd 100755 --- a/cg/cg5500.h +++ b/cg/cg5500.h @@ -17,7 +17,7 @@ class Visliq_app : public TApplication TRelation* _nditte; TArray_sheet* _ditte; - TArray _nomiditte; + TString_array _nomiditte; TTable* _lim; TTable* _lam; diff --git a/cg/cg5500b.uml b/cg/cg5500b.uml index b5d457c36..5b7314fbf 100755 --- a/cg/cg5500b.uml +++ b/cg/cg5500b.uml @@ -2,7 +2,7 @@ TOOLBAR "" 0 20 0 2 -BUTTON DLG_SAVEREC 8 2 +BUTTON DLG_SAVEREC 10 2 BEGIN PROMPT -13 -1 "~Registra" PICTURE BMP_SAVEREC @@ -10,12 +10,12 @@ PICTURE BMP_SAVERECDN MESSAGE EXIT,K_SAVE END -BUTTON DLG_CANCEL 8 2 +BUTTON DLG_CANCEL 10 2 BEGIN PROMPT -23 -1 "" END -BUTTON DLG_QUIT 8 2 +BUTTON DLG_QUIT 10 2 BEGIN PROMPT -33 -1 "" MESSAGE EXIT,K_QUIT