Corretto funzionamento nel reinserimento
git-svn-id: svn://10.65.10.50/trunk@1211 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
9491390e2c
commit
28e19f6451
@ -1,4 +1,4 @@
|
||||
// $Id: relapp.cpp,v 1.50 1995-03-22 11:38:59 guy Exp $
|
||||
// $Id: relapp.cpp,v 1.51 1995-04-06 15:27:54 alex Exp $
|
||||
#include <mailbox.h>
|
||||
#include <sheet.h>
|
||||
#include <urldefid.h>
|
||||
@ -229,7 +229,8 @@ void TRelation_application::set_fixed()
|
||||
|
||||
void TRelation_application::enable_query()
|
||||
{
|
||||
const bool query = _mask->mode() == MODE_QUERY;
|
||||
const bool query = _mask->query_mode();
|
||||
const bool noedit = !_mask->edit_mode();
|
||||
const byte numkeys = _maskeys->items();
|
||||
|
||||
for (byte k = 1; k <= numkeys; k++)
|
||||
@ -242,9 +243,7 @@ void TRelation_application::enable_query()
|
||||
if (c.enabled_default())
|
||||
{
|
||||
if (k == 1)
|
||||
{
|
||||
c.enable(query);
|
||||
}
|
||||
c.enable(noedit);
|
||||
if (c.has_query())
|
||||
((TEdit_field&)c).enable_check(query);
|
||||
}
|
||||
@ -643,7 +642,11 @@ bool TRelation_application::save(bool check_dirty)
|
||||
get_relation()->zero();
|
||||
err = write(*_mask);
|
||||
if (err == _isreinsert)
|
||||
{
|
||||
changed = autonum(_mask, TRUE);
|
||||
if (!changed)
|
||||
_mask.disable_starting_checks();
|
||||
}
|
||||
else
|
||||
changed = FALSE;
|
||||
}
|
||||
@ -689,7 +692,7 @@ int TRelation_application::write(const TMask& m)
|
||||
{
|
||||
TRelation *r = get_relation();
|
||||
m.autosave(r);
|
||||
r->write();
|
||||
r->write();
|
||||
return r->status();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user