diff --git a/include/form.cpp b/include/form.cpp index 49be48b50..f403cd87d 100755 --- a/include/form.cpp +++ b/include/form.cpp @@ -2394,7 +2394,8 @@ bool TForm::print(long from, long to) if (pr.printtype() == screenvis) error_box("Stampa a video selezionata. Non e' possibile effettuare il posizionamento."); else - arrange_form(); + if (_arrange) + arrange_form(); } pr.setheaderhandler(header_handler); // Setta handlers @@ -2675,7 +2676,7 @@ TForm::TForm(const char* name, const char* code, int lev, const char* desc) : _name(name), _code(code), _relation(NULL), _cursor(NULL), _rel_desc(NULL), _isnew(FALSE), _editlevel(lev), _desc(desc), _fontname("Courier New"), _fontsize(12), _x(0), _y(0), _char_to_pos('\0'), _ipx(0), _ipy(0), _fpx(0), - _dirty(FALSE) + _arrange(TRUE), _dirty(FALSE) { main_app().begin_wait(); diff --git a/include/form.h b/include/form.h index ddc67179b..7d7d3900c 100755 --- a/include/form.h +++ b/include/form.h @@ -114,7 +114,8 @@ class TForm : public TObject bool _lastpage; // I am about to print the last page? bool _isnew; // new form - bool _isbase; // base form (.frm file) + bool _isbase; // base form (.frm file) + bool _arrange; // if TRUE perform arranging every time int _editlevel; // Edit permission TString _desc; // form description @@ -179,6 +180,7 @@ public: int& fpx() { return _fpx; } bool dirty() const { return _dirty; } void set_dirty(bool d = TRUE) { _dirty = d; } + void set_arrange(bool arng = TRUE) { _arrange = arng ; } // if code == NULL it's a base form // otherwise it's integrated by a file definition