From d940129a6b58e135ffcf1867ea662b0703d0e709 Mon Sep 17 00:00:00 2001 From: angelo Date: Thu, 26 Sep 1996 07:43:15 +0000 Subject: [PATCH] Corretto errore MI.... : evita l'update dello spreadsheet, permettendo di variare i parametri del campo anche da spreadsheet, senza entrare dettaglio. git-svn-id: svn://10.65.10.50/trunk@3661 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- include/form.cpp | 9 ++++++--- include/form.h | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/include/form.cpp b/include/form.cpp index 09b542afc..15301e4c8 100755 --- a/include/form.cpp +++ b/include/form.cpp @@ -2370,9 +2370,10 @@ bool TPrint_section::special_field_handler(TMask_field& f, KEY k) return TRUE; } -void TPrint_section::repos_fields(const char* name, int size) +bool TPrint_section::repos_fields(const char* name, int size) { TPrint_section& ps = ::section(); + bool rt = FALSE; if (ps.form().fontname() != name || ps.form().fontsize() != size) { @@ -2380,6 +2381,7 @@ void TPrint_section::repos_fields(const char* name, int size) ps.set_dirty(); if (yesno_box("E' stato cambiato il font o la dimensione del carattere.\nSi desidera aggiornare le coordinate dei campi?")) { + rt = TRUE; s_data prm; prm.size_1=ps.form().fontsize(); strcpy(prm.name_1,ps.form().fontname()); @@ -2446,6 +2448,7 @@ void TPrint_section::repos_fields(const char* name, int size) ms.row(i) = tt; } } + return rt; } // handlers for section editing @@ -2737,8 +2740,8 @@ bool TPrint_section::detail_field_notify (TSheet_field& s, int r, KEY k) { TString80 name(s.mask().get(F_FONT)); int size = s.mask().get_int(F_SIZE); - repos_fields(name,size); - s.force_update(); + if (repos_fields(name,size)) + s.force_update(); } } diff --git a/include/form.h b/include/form.h index 7d67b4fe5..0743ab5e8 100755 --- a/include/form.h +++ b/include/form.h @@ -473,7 +473,7 @@ protected: TForm_item* parse_item(TScanner& scanner); // @cmember Procedura che effettua il ricalcolo delle coordinate di nel caso il font sia cambiato - static void repos_fields(const char* name, int size); + static bool repos_fields(const char* name, int size); // @cmember Handler del bottone per editare in modo dettagliato un static bool detail_field_handler(TMask_field&, KEY); // @cmember Handler del bottone per editare gli specials di un