Patch level :2.2 prima patch su CA in uscita
Files correlati : Ricompilazione Demo : [ ] Commento :aggiunto il controllo sui campi tipo profilo in modo che, se non dovesse esistere alcun profilo, l'imbecillissimo programma eviti di azzerare tutti i campi della maschera git-svn-id: svn://10.65.10.50/trunk@13527 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
e2113e9181
commit
c886d4183e
@ -2201,31 +2201,33 @@ int TMask::load_profile(int num, bool reset)
|
|||||||
|
|
||||||
TString16 name; name << num;
|
TString16 name; name << num;
|
||||||
TAssoc_array& var = ini.list_variables(name);
|
TAssoc_array& var = ini.list_variables(name);
|
||||||
|
if (var.items() > 0)
|
||||||
for (int pos = fields()-1; pos >= 0; pos--)
|
{
|
||||||
{
|
for (int pos = fields()-1; pos >= 0; pos--)
|
||||||
TMask_field& f = fld(pos);
|
{
|
||||||
if (f.is_loadable() && f.get_default().empty())
|
TMask_field& f = fld(pos);
|
||||||
{
|
if (f.is_loadable() && f.get_default().empty())
|
||||||
name.format("F_%d", f.dlg());
|
{
|
||||||
if (reset || var.objptr(name) != NULL)
|
name.format("F_%d", f.dlg());
|
||||||
{
|
if (reset || var.objptr(name) != NULL)
|
||||||
if (f.is_sheet())
|
{
|
||||||
{
|
if (f.is_sheet())
|
||||||
TSheet_field& sf = (TSheet_field&)f;
|
{
|
||||||
sf.destroy();
|
TSheet_field& sf = (TSheet_field&)f;
|
||||||
for (int r = 0; ini.exist(name,r); r++)
|
sf.destroy();
|
||||||
sf.row(r) = ini.get(name, NULL, r);
|
for (int r = 0; ini.exist(name,r); r++)
|
||||||
sf.force_update();
|
sf.row(r) = ini.get(name, NULL, r);
|
||||||
}
|
sf.force_update();
|
||||||
else
|
}
|
||||||
{
|
else
|
||||||
if (!f.is_firm())
|
{
|
||||||
f.set(ini.get(name));
|
if (!f.is_firm())
|
||||||
}
|
f.set(ini.get(name));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return num;
|
return num;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user