Patch level : 10.0 290

Files correlati     : pe0.exe
Ricompilazione Demo : [ ]
Commento            :

Espansione righe a un livello per volta


git-svn-id: svn://10.65.10.50/trunk@18814 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
alex 2009-05-04 23:34:22 +00:00
parent eae4ff153c
commit 5dc7e80139

View File

@ -32,6 +32,7 @@ class TGestione_preventivo_msk : public TDocumento_mask
{
int _rule;
int _clipboard_row;
protected:
//hanlder di documento:
static bool pe_data_handler(TMask_field& f, KEY k);
@ -297,11 +298,14 @@ bool TGestione_preventivo_msk::pe_espandi_handler(TMask_field& f, KEY k)
TGestione_preventivo_msk& mask = (TGestione_preventivo_msk&)f.mask();
TSheet_field& sh = mask.sfield(F_SHEET);
const int r = sh.selected();
const int size = f.dlg() == F_SHRINK_ALL ? 1 : -1;
const bool shrink = f.dlg() == F_SHRINK_ALL;
const int size = shrink ? 1 : -1;
int row_to_select = 0;
FOR_EACH_SHEET_ROW(sh, i, row)
{
const int row_level = mask.doc()[i + 1].get_int(RDOC_LEVEL);
if (row_level > 0)
sh.set_row_height(i, size);
else
@ -326,13 +330,19 @@ bool TGestione_preventivo_msk::pe_espandi_riga_handler(TMask_field& f, KEY k)
if (r >= 0 && r < sh.items())
{
const int size = f.dlg() == F_SHRINK_ROW ? 1 : -1;
const bool shrink = f.dlg() == F_SHRINK_ROW;
const int size = shrink ? 1 : -1;
for (int i = r + 1; i < sh.items(); i++)
{
const int child_level = mask.doc()[i + 1].get_int(RDOC_LEVEL);
if (child_level > level)
if (child_level == level + 1)
sh.set_row_height(i, size);
else
if (child_level > level + 1)
sh.set_row_height(i, 1);
else
break;
}
}
@ -720,4 +730,4 @@ int pe0400( int argc, char* argv[])
a.run( argc, argv, TR("Gestione Preventivi"));
return 0;
}
}