Miglirato il comportamento della find nel caso di chiavi non required

git-svn-id: svn://10.65.10.50/trunk@404 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
alex 1994-10-19 11:49:19 +00:00
parent 3bd418c93d
commit da95408d5c

View File

@ -1,4 +1,4 @@
// $Id: relapp.cpp,v 1.16 1994-10-14 19:15:17 guy Exp $
// $Id: relapp.cpp,v 1.17 1994-10-19 11:49:19 alex Exp $
#include <mailbox.h>
#include <sheet.h>
#include <urldefid.h>
@ -465,6 +465,7 @@ bool TRelation_application::test_key(byte k, bool err)
{
const int num = chiave.pos(i);
TMask_field& c = _mask->fld(num);
if (c.required())
{
onereq = TRUE;
@ -479,7 +480,8 @@ bool TRelation_application::test_key(byte k, bool err)
}
}
else
if (k == 1 && !onereq && !onefill && c.get().not_empty())
/* if (k == 1 && !onereq && !onefill && c.get().not_empty()) */
if (!onereq && !onefill && c.is_edit() && c.get().not_empty())
onefill = TRUE;
}
if (k == 1 && !onereq && !onefill)
@ -488,7 +490,7 @@ bool TRelation_application::test_key(byte k, bool err)
error_box("Manca un valore indispensabile per la ricerca");
return FALSE;
}
return TRUE;
return onefill || onereq;
}
// Guy: doesn't change fields