maskfld.cpp Corretta ulteriormente gestione check search
msksheet.cpp Corretta swap_columns totkens.h Aggiunta keyword SEARCH git-svn-id: svn://10.65.10.50/trunk@2366 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
cb27a9beae
commit
b9b7fb50c5
@ -1800,7 +1800,7 @@ bool TBrowse::check(CheckTime t)
|
||||
_cursor->setkey();
|
||||
_cursor->file().read(_isequal);
|
||||
passed = _cursor->ok();
|
||||
|
||||
|
||||
if (t != FINAL_CHECK)
|
||||
{
|
||||
if (passed)
|
||||
@ -1822,17 +1822,29 @@ bool TBrowse::check(CheckTime t)
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (chk == CHECK_SEARCH)
|
||||
passed = TRUE;
|
||||
}
|
||||
}
|
||||
else
|
||||
if (t != FINAL_CHECK) do_clear();
|
||||
{
|
||||
if (chk == CHECK_SEARCH)
|
||||
passed = TRUE;
|
||||
else
|
||||
{
|
||||
if (t != FINAL_CHECK)
|
||||
do_clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
return passed;
|
||||
}
|
||||
|
||||
bool TBrowse::empty_check()
|
||||
{
|
||||
if ( field().mask().query_mode() || _fld->check_type() == CHECK_NONE ||
|
||||
_fld->check_type() == CHECK_NORMAL)
|
||||
if (field().mask().query_mode() || _fld->check_type() != CHECK_REQUIRED)
|
||||
return TRUE;
|
||||
else
|
||||
return do_input() > 0;
|
||||
@ -2288,7 +2300,7 @@ bool TEdit_field::on_key(KEY key)
|
||||
if (!ok)
|
||||
{
|
||||
if (_warning.not_empty())
|
||||
error_box(_warning);
|
||||
default_error_box();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -2330,7 +2342,7 @@ bool TEdit_field::on_key(KEY key)
|
||||
if (!ok)
|
||||
{
|
||||
if (_warning.not_empty())
|
||||
error_box(_warning);
|
||||
default_error_box();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -979,7 +979,7 @@ void TSpreadsheet::list_handler(XI_EVENT *xiev)
|
||||
if (_check_enabled)
|
||||
{
|
||||
_check_enabled = FALSE; // Avoid recursion!
|
||||
if (_row_dirty)
|
||||
if (_row_dirty && active())
|
||||
{
|
||||
bool ok = sheet_mask().check_fields();
|
||||
if (ok)
|
||||
@ -1429,9 +1429,7 @@ void TSpreadsheet::mask2str(int rec)
|
||||
{
|
||||
if (_needs_update >= 0)
|
||||
{
|
||||
#ifdef DBG
|
||||
warning_box("Double update: %d and %d", _needs_update, rec);
|
||||
#endif
|
||||
// Double update!
|
||||
update_rec(_needs_update);
|
||||
}
|
||||
_needs_update = rec;
|
||||
@ -1537,7 +1535,7 @@ void TSpreadsheet::swap_columns(const int fromid, const int toid) const
|
||||
int from_pos = 0;
|
||||
int to_pos = 0;
|
||||
|
||||
for (int c = 1; c < num; c++)
|
||||
for (int c = num-1; c > 0; c--)
|
||||
{
|
||||
XI_OBJ* column = columns[c];
|
||||
if (column->cid == fromid)
|
||||
@ -1551,9 +1549,9 @@ void TSpreadsheet::swap_columns(const int fromid, const int toid) const
|
||||
to_pos = c;
|
||||
};
|
||||
}
|
||||
|
||||
CHECKD(from_pos, "Can't swap column ", fromid);
|
||||
CHECKD(to_pos, "Can't swap column ", toid);
|
||||
xi_move_column(from_column, to_pos);
|
||||
if (to_pos < from_pos) from_pos++;
|
||||
xi_move_column(to_column, from_pos);
|
||||
#endif
|
||||
}
|
||||
|
@ -37,6 +37,7 @@
|
||||
#define PROMPT PR
|
||||
#define RADIOBUTTON RA
|
||||
#define RUN RU
|
||||
#define SEARCH SE
|
||||
#define SELECT SE
|
||||
#define STRING ST
|
||||
#define SHEET SH
|
||||
|
Loading…
x
Reference in New Issue
Block a user