Patch level :CD 210

Files correlati     :un casino di .exe
Ricompilazione Demo : [ ]
Commento            :
sistemato problema del modulo in stampa tabelle che non cominciano con BA


git-svn-id: svn://10.65.10.50/trunk@18070 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
luca 2009-01-21 16:02:08 +00:00
parent 5c153657ab
commit 89b6712873

View File

@ -1,3 +1,4 @@
#include <applicat.h>
#include <checks.h>
#define __TABUTIL_CPP
@ -159,7 +160,30 @@ void TTable::load_module_description()
n.lower();
TString_array f;
if (list_files(n, f) == 1)
int nfiles = list_files(n, f);
//gestisce il caso in cui le maschere di tabella siano multiple e iniziano con ba o nome modulo
if (nfiles > 1)
{
const TString4 preferred = main_app().name().left(2);
for (int i = nfiles - 1; i >= 0; i--)
{
n = f.row(i);
if (n.starts_with("ba"))
f.destroy(i, true);
else
{
if (n.starts_with(preferred))
{
f.destroy();
f.add(n);
break;
}
}
}
nfiles = f.items();
}
if (nfiles == 1)
{
n = f.row(0);
if (!n.exist())