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];
|
static char key[MAXLEN];
|
||||||
TAG4 *t;
|
TAG4 *t;
|
||||||
int klen;
|
int klen;
|
||||||
|
const char* src;
|
||||||
|
|
||||||
HANDLE2DATASTR(handle, data);
|
HANDLE2DATASTR(handle, data);
|
||||||
|
|
||||||
@ -1056,8 +1057,14 @@ char* DB_index_getkey(int handle)
|
|||||||
return(NULL);
|
return(NULL);
|
||||||
klen=a4tagKeyLen(data);
|
klen=a4tagKeyLen(data);
|
||||||
if (klen > (MAXLEN-1)) klen=MAXLEN-1;
|
if (klen > (MAXLEN-1)) klen=MAXLEN-1;
|
||||||
memcpy(key,a4tagKey(data),klen); /* tfile4key non restituisce una null terminated string */
|
src = a4tagKey(data);
|
||||||
|
if (src != NULL)
|
||||||
|
{
|
||||||
|
memcpy(key,src,klen); /* tfile4key non restituisce una null terminated string */
|
||||||
key[klen]='\0';
|
key[klen]='\0';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
key[0] = '\0';
|
||||||
return key;
|
return key;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3038,13 +3038,19 @@ bool TSheet_field::on_hit()
|
|||||||
TSpreadsheet* s = (TSpreadsheet*)_ctl;
|
TSpreadsheet* s = (TSpreadsheet*)_ctl;
|
||||||
|
|
||||||
if (s->auto_append() && items() == 0 && !m.query_mode())
|
if (s->auto_append() && items() == 0 && !m.query_mode())
|
||||||
|
{
|
||||||
s->add_row_auto(); // Inserisco automaticamente la prima riga vuota nello sheet
|
s->add_row_auto(); // Inserisco automaticamente la prima riga vuota nello sheet
|
||||||
force_update();
|
force_update();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
force_update();
|
||||||
if (items() > 0)
|
if (items() > 0)
|
||||||
{
|
{
|
||||||
m.notify_focus_field(dlg()); // Fa' credere alla maschera che ha il focus ...
|
m.notify_focus_field(dlg()); // Fa' credere alla maschera che ha il focus ...
|
||||||
select(0, -2, TRUE); // ... cosi' la set_focus_cell funziona bene
|
select(0, -2, TRUE); // ... cosi' la set_focus_cell funziona bene
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
set_dirty(FALSE);
|
set_dirty(FALSE);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user