Aggiunto metodo per eliminare gli starting check

git-svn-id: svn://10.65.10.50/trunk@1213 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
alex 1995-04-06 15:30:32 +00:00
parent 7d6e56859f
commit 3ed9e86ea5
2 changed files with 16 additions and 9 deletions

View File

@ -288,8 +288,9 @@ void TMask::add_buttons()
} }
TMask::TMask(const char* maskname, int num, int max) TMask::TMask(const char* maskname, int num, int max) : _should_check(TRUE)
{ {
if (maskname && *maskname) if (maskname && *maskname)
read_mask(maskname, num, max); read_mask(maskname, num, max);
} }
@ -398,6 +399,8 @@ short TMask::dirty() const
} }
void TMask::load_checks() const void TMask::load_checks() const
{
if (_should_check)
{ {
const int max = fields(); const int max = fields();
for (int i = 0; i < max; i++) for (int i = 0; i < max; i++)
@ -407,6 +410,7 @@ void TMask::load_checks() const
f.check(STARTING_CHECK); f.check(STARTING_CHECK);
} }
} }
}
// Dis/abilita una pagina e tutte le successive // Dis/abilita una pagina e tutte le successive
void TMask::enable_page(byte page, bool on) void TMask::enable_page(byte page, bool on)
@ -441,6 +445,7 @@ void TMask::start_run()
const long start = clock(); const long start = clock();
load_checks(); load_checks();
_should_check = TRUE;
const int max = fields(); const int max = fields();

View File

@ -53,6 +53,7 @@ class TMask : public TWindow
real _exchange; // Current value exhange real _exchange; // Current value exhange
bool _sheetmask; // Mask owned by a sheet bool _sheetmask; // Mask owned by a sheet
bool _should_check; // Mask should load checks when starting
long _total_time, _build_time, _init_time; long _total_time, _build_time, _init_time;
@ -148,6 +149,7 @@ public:
void move_focus_field(int num); void move_focus_field(int num);
void set_focus_win(WINDOW win, bool force); void set_focus_win(WINDOW win, bool force);
int focus_field() const { return _focus;} int focus_field() const { return _focus;}
void disable_starting_check() { _should_check = FALSE;}
virtual bool on_key(KEY key); virtual bool on_key(KEY key);
void on_firm_change(); void on_firm_change();