From 73162f3c42206b6cc535e41421e40873ab3f4105 Mon Sep 17 00:00:00 2001 From: alex Date: Thu, 28 May 2009 13:57:51 +0000 Subject: [PATCH] Patch level : 10.0 320 Files correlati : VE0.exe Ricompilazione Demo : [ ] Commento Ciorretto il cambio tipo riga al volo git-svn-id: svn://10.65.10.50/trunk@18957 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- ve/velib06a.cpp | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/ve/velib06a.cpp b/ve/velib06a.cpp index 632a2454b..2d17920af 100755 --- a/ve/velib06a.cpp +++ b/ve/velib06a.cpp @@ -573,28 +573,24 @@ bool tipo_riga_handler(TMask_field& f, KEY key) { const int curr_row = sf->selected(); TToken_string & row = sf->row(curr_row); - const int col = sf->cid2index(FR_TIPORIGA); - const TString16 old_tipo_riga = row.get(col); + const TString16 old_tipo_riga = docmask.doc()[curr_row + 1].get(RDOC_TIPORIGA); const TString16 tipo_riga = f.get(); - if (!row_mask.is_running()) + if (old_tipo_riga != tipo_riga) { - if (old_tipo_riga != tipo_riga) + if (!row_mask.is_running()) { - row.add(tipo_riga, col); docmask.doc()[curr_row + 1].set_tipo(tipo_riga); - TMask * rm = docmask.riga_mask(curr_row); sf->post_insert(curr_row); sf->check_row(curr_row); sf->force_update(curr_row); } - } - else - if (old_tipo_riga != tipo_riga) + else { f.set(old_tipo_riga); - return error_box("Impossibile cambiare il tipo nella maschera di riga"); + return f.error_box("Impossibile cambiare il tipo nella maschera di riga"); } + } } } }