diff --git a/pe/pe0400.cpp b/pe/pe0400.cpp index 420506cc9..27af68d5f 100755 --- a/pe/pe0400.cpp +++ b/pe/pe0400.cpp @@ -334,9 +334,9 @@ bool TGestione_preventivo_msk::pe_incolla_handler(TMask_field& f, KEY k) if (i > mask._clipboard_row && orig_level >= row_level) break; const TRiga_documento & row = doc[i]; - TRiga_documento & new_row = doc.insert_row(start_row, row.get(RDOC_TIPORIGA)); - sh.insert(start_row - 1); + sh.insert(start_row - 1, false, true); + TRiga_documento & new_row = doc[start_row]; doc.copy_data(new_row, row); row_level += level_offset; new_row.put(RDOC_LEVEL, row_level); @@ -348,23 +348,9 @@ bool TGestione_preventivo_msk::pe_incolla_handler(TMask_field& f, KEY k) i++; } - for (i = 1; i <= doc.physical_rows(); i++) - { - const int row_level = doc[i].get_int(RDOC_LEVEL); - const bool prodfin = row_level == 0; - const bool price_enabled = (i == doc.physical_rows()) || (row_level >= doc[i + 1].get_int(RDOC_LEVEL)); - short id; - - sh.enable_cell(i - 1, sh.cid2index(FR_PREZZO), price_enabled); - sh.enable_cell(i - 1, sh.cid2index(FR_JOLLY2), price_enabled); - for (id = FR_CDC1; id < FR_CDC12; id++) - sh.enable_cell(i - 1, id, prodfin); - for (id = FR_DESCDC1; id < FR_DESCDC12; id++) - sh.enable_cell(i - 1, id, prodfin); - mask.highlight_row(i - 1, COLOR_INVALID, COLOR_INVALID, true, false); - } + mask.highlight(); sh.force_update(); - } + } mask._clipboard_row = -1; mask.reset(F_LIVELLO); }