Patch level : 10.0

Files correlati     : ve2
Ricompilazione Demo : [ ]
Commento            :
Migliorata gestione campi chiave con identificatore nullo


git-svn-id: svn://10.65.10.50/trunk@19490 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2009-10-21 15:06:27 +00:00
parent a6f421d6e1
commit 12df1c7a44

View File

@ -214,16 +214,19 @@ bool TRelation_application::destroy()
void TRelation_application::set_fixed() void TRelation_application::set_fixed()
{ {
TToken_string s(256, '='); TToken_string s(256, '=');
for (const char* f = _fixed.get(0); f && *f; f = _fixed.get()) FOR_EACH_TOKEN(_fixed, f)
{ {
s = f; s = f;
const int id = s.get_int(0); const short id = s.get_int(0);
s = s.get(); if (id > 0 && _mask->id2pos(id) >= 0)
if (s.not_empty()) {
_mask->set(id, s); s = s.get();
if (s.not_empty())
if (_lnflag < 2) _mask->set(id, s);
_mask->disable(id);
if (_lnflag < 2)
_mask->disable(id);
}
} }
} }
@ -1569,7 +1572,7 @@ bool TRelation_application::filter()
while (id > 0) while (id > 0)
{ {
_search_id = id; _search_id = id;
TEdit_field& f = (TEdit_field&)_mask->field(id); TEdit_field& f = _mask->efield(id);
TCursor* cur = f.browse()->cursor(); TCursor* cur = f.browse()->cursor();
TRectype& rec = cur->curr(); TRectype& rec = cur->curr();
rec.zero(); rec.zero();
@ -1681,7 +1684,7 @@ bool TRelation_application::filter()
else else
if (v) val = *v; if (v) val = *v;
if (v) if (v && f.dlg() > 0)
{ {
t.format("%d=", f.dlg()); t.format("%d=", f.dlg());
val.insert(t, 0); val.insert(t, 0);