Patch level : 10.0

Files correlati     : liberie
Ricompilazione Demo : [ ]
Commento            :
Modifiche di Guy per la gestione di CTRL+'-' negli sheet


git-svn-id: svn://10.65.10.50/branches/R_10_00@20973 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
luca83 2010-10-08 08:55:33 +00:00
parent 421545649c
commit d21df8023e
2 changed files with 19 additions and 3 deletions

View File

@ -1016,6 +1016,12 @@ bool TMask::on_key(
}
}
break;
/*
case K_CTRL+'-':
if (is_running() && focus_field().is_sheet())
send_key(key, focus_field().dlg());
break;
*/
default:
if (key > K_CTRL)
{

View File

@ -1771,8 +1771,6 @@ bool TSpreadsheet::event_handler(XI_OBJ* itf, XI_EVENT *xiev)
if (xiev->v.xvte.type == E_CHAR)
{
const KEY k = e_char_to_key(&xiev->v.xvte);
switch (k)
{
case K_DOWN:
@ -3137,12 +3135,24 @@ bool TSheet_field::on_key(KEY k)
_ctl->event_handler(NULL, &xie);
return true;
}
if (k == K_CTRL+'+')
if (k == K_CTRL+'+')
{
TSpreadsheet* s = (TSpreadsheet*)_ctl;
s->add_row_auto();
return true;
}
if (k == K_CTRL+'-')
{
TSpreadsheet* s = (TSpreadsheet*)_ctl;
XI_EVENT e; memset(&e, 0, sizeof(e));
e.type = XIE_CHAR_CELL;
e.v.chr.ch = '-';
e.v.chr.control = true;
return s->event_handler(NULL, &e);
}
return TOperable_field::on_key(k);
}