Patch level : 2.0
Files correlati : tutti Ricompilazione Demo : [ ] Commento : Corretta gestione focus indesiderato sulla prima riga di uno sheet con una sola riga nuova git-svn-id: svn://10.65.10.50/trunk@18397 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
16ea6325ab
commit
3e930bf69c
@ -1049,6 +1049,7 @@ char* DB_index_getkey(int handle)
|
||||
static char key[MAXLEN];
|
||||
TAG4 *t;
|
||||
int klen;
|
||||
const char* src;
|
||||
|
||||
HANDLE2DATASTR(handle, data);
|
||||
|
||||
@ -1056,8 +1057,14 @@ char* DB_index_getkey(int handle)
|
||||
return(NULL);
|
||||
klen=a4tagKeyLen(data);
|
||||
if (klen > (MAXLEN-1)) klen=MAXLEN-1;
|
||||
memcpy(key,a4tagKey(data),klen); /* tfile4key non restituisce una null terminated string */
|
||||
key[klen]='\0';
|
||||
src = a4tagKey(data);
|
||||
if (src != NULL)
|
||||
{
|
||||
memcpy(key,src,klen); /* tfile4key non restituisce una null terminated string */
|
||||
key[klen]='\0';
|
||||
}
|
||||
else
|
||||
key[0] = '\0';
|
||||
return key;
|
||||
}
|
||||
|
||||
|
@ -3038,12 +3038,18 @@ bool TSheet_field::on_hit()
|
||||
TSpreadsheet* s = (TSpreadsheet*)_ctl;
|
||||
|
||||
if (s->auto_append() && items() == 0 && !m.query_mode())
|
||||
s->add_row_auto(); // Inserisco automaticamente la prima riga vuota nello sheet
|
||||
force_update();
|
||||
if (items() > 0)
|
||||
{
|
||||
m.notify_focus_field(dlg()); // Fa' credere alla maschera che ha il focus ...
|
||||
select(0, -2, TRUE); // ... cosi' la set_focus_cell funziona bene
|
||||
s->add_row_auto(); // Inserisco automaticamente la prima riga vuota nello sheet
|
||||
force_update();
|
||||
}
|
||||
else
|
||||
{
|
||||
force_update();
|
||||
if (items() > 0)
|
||||
{
|
||||
m.notify_focus_field(dlg()); // Fa' credere alla maschera che ha il focus ...
|
||||
select(0, -2, TRUE); // ... cosi' la set_focus_cell funziona bene
|
||||
}
|
||||
}
|
||||
|
||||
set_dirty(FALSE);
|
||||
|
Loading…
x
Reference in New Issue
Block a user