Sistemato l'aggiornamento dello sheet degli indirizzi di spedizione:
tolto dall'handler() e messo nella notify(). git-svn-id: svn://10.65.10.50/trunk@1873 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
555b7946ae
commit
a18564a49a
@ -48,7 +48,7 @@ protected:
|
|||||||
|
|
||||||
////////////
|
////////////
|
||||||
static bool indsp_notify(TSheet_field& s, int r, KEY key);
|
static bool indsp_notify(TSheet_field& s, int r, KEY key);
|
||||||
static bool indsp_handler(TMask_field& f, KEY key) ;
|
static void indsp_sheet_rebuilder();
|
||||||
virtual int write(const TMask& m);
|
virtual int write(const TMask& m);
|
||||||
virtual int rewrite(const TMask& m);
|
virtual int rewrite(const TMask& m);
|
||||||
virtual int read(TMask& m);
|
virtual int read(TMask& m);
|
||||||
@ -522,16 +522,10 @@ void TClifo_application::common_f(const TMask& m)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
void TClifo_application::indsp_sheet_rebuilder()
|
||||||
bool TClifo_application::indsp_handler(TMask_field& f, KEY key)
|
|
||||||
{
|
|
||||||
static int first_time=1;
|
|
||||||
|
|
||||||
if (key == K_TAB && f.dirty()) // Was it changed ?
|
|
||||||
if (first_time)
|
|
||||||
{
|
{
|
||||||
TArray& righe=app().indsp_sheet().rows_array();
|
TArray& righe=app().indsp_sheet().rows_array();
|
||||||
int n=righe.items();
|
const int n=righe.items();
|
||||||
app().reset_sheet();
|
app().reset_sheet();
|
||||||
// Rebuild Sheets
|
// Rebuild Sheets
|
||||||
for (int i=0; i<n; i++)
|
for (int i=0; i<n; i++)
|
||||||
@ -547,10 +541,6 @@ bool TClifo_application::indsp_handler(TMask_field& f, KEY key)
|
|||||||
app().field_sheet(F_CODINDSP)->add(rigav);
|
app().field_sheet(F_CODINDSP)->add(rigav);
|
||||||
app().field_sheet(F_CODINDEFF)->add(rigav);
|
app().field_sheet(F_CODINDEFF)->add(rigav);
|
||||||
}
|
}
|
||||||
first_time=0;
|
|
||||||
} else
|
|
||||||
first_time=1;
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TClifo_application::indsp_notify(TSheet_field& indsp, int r, KEY key)
|
bool TClifo_application::indsp_notify(TSheet_field& indsp, int r, KEY key)
|
||||||
@ -580,6 +570,8 @@ bool TClifo_application::indsp_notify(TSheet_field& indsp, int r, KEY key)
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if (key == K_ENTER || key == K_DEL)
|
||||||
|
indsp_sheet_rebuilder();
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -608,7 +600,6 @@ bool TClifo_application::user_create() // initvar e arrmask
|
|||||||
_msk->set_handler(F_CODALLEG, codalleg_handler);
|
_msk->set_handler(F_CODALLEG, codalleg_handler);
|
||||||
if (!_ignoreven)
|
if (!_ignoreven)
|
||||||
{
|
{
|
||||||
_msk->set_handler(F_SHEET_G_VEN, indsp_handler);
|
|
||||||
TSheet_field& ind = (TSheet_field&) _msk->field(F_SHEET_G_VEN);
|
TSheet_field& ind = (TSheet_field&) _msk->field(F_SHEET_G_VEN);
|
||||||
ind.set_notify(indsp_notify);
|
ind.set_notify(indsp_notify);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user