Corretto metodo TPrint_section::tab() e tolta la segnalazione di errore
se la prima colonna stampabile era diversa da 1. git-svn-id: svn://10.65.10.50/trunk@2403 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
b404553548
commit
f32b35bfa1
@ -2037,8 +2037,14 @@ int TPrint_section::tab(int col)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// cumulate offsets
|
// cumulate offsets
|
||||||
|
int last = 0;
|
||||||
for (i = 1; i <= (word)maxcolreached; i++)
|
for (i = 1; i <= (word)maxcolreached; i++)
|
||||||
_tab[i] += _tab[i-1];
|
{
|
||||||
|
if (_tab[i - 1] != -1)
|
||||||
|
last = i - 1;
|
||||||
|
if (_tab[i] != -1)
|
||||||
|
_tab[i] += _tab[last];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// se manca la colonna, vai a prendere quella immediatamente prima
|
// se manca la colonna, vai a prendere quella immediatamente prima
|
||||||
while (_tab[col] == -1 && col > 0)
|
while (_tab[col] == -1 && col > 0)
|
||||||
@ -2535,14 +2541,7 @@ bool TPrint_section::edit(const char* title)
|
|||||||
for (int i=0; i<items && !ok; i++)
|
for (int i=0; i<items && !ok; i++)
|
||||||
{
|
{
|
||||||
TToken_string& tt = ms.row(i);
|
TToken_string& tt = ms.row(i);
|
||||||
if (tt.get_char(prn_id - 101)=='X')
|
ok = tt.get_char(prn_id - 101)==' ';
|
||||||
continue;
|
|
||||||
else
|
|
||||||
if (tt.get_int(col_id-101) != 1)
|
|
||||||
{
|
|
||||||
error_box("La prima colonna stampabile deve essere numerata con 1");
|
|
||||||
break;
|
|
||||||
} else ok = TRUE;
|
|
||||||
}
|
}
|
||||||
if (i==items && !ok) error_box("Selezionare almeno una colonna stampabile.");
|
if (i==items && !ok) error_box("Selezionare almeno una colonna stampabile.");
|
||||||
if (ok) break;
|
if (ok) break;
|
||||||
@ -2934,7 +2933,7 @@ TPrint_section* TForm::exist(char s, pagetype t, bool create)
|
|||||||
TForm_item& TForm::find_field(char s, pagetype t, short id) const
|
TForm_item& TForm::find_field(char s, pagetype t, short id) const
|
||||||
{
|
{
|
||||||
const TPrint_section* ps = ((TForm*)this)->exist(s, t);
|
const TPrint_section* ps = ((TForm*)this)->exist(s, t);
|
||||||
CHECKD(ps, "Can't find section for field %d", id);
|
CHECKD(ps, "Can't find section for field ", id);
|
||||||
return ps->find_field(id);
|
return ps->find_field(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user