Corretta correzione precedente
git-svn-id: svn://10.65.10.50/trunk@2482 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
1d3b9b7826
commit
1c0919a4ba
@ -631,24 +631,17 @@ int TSpreadsheet::find_enabled_column(int rec, int colonna, int direction) const
|
|||||||
// riga (da 0), colonna (0 = numero, 1 = prima cella, ...)
|
// riga (da 0), colonna (0 = numero, 1 = prima cella, ...)
|
||||||
void TSpreadsheet::set_focus_cell(int riga, int colonna)
|
void TSpreadsheet::set_focus_cell(int riga, int colonna)
|
||||||
{
|
{
|
||||||
const bool has_focus = mask().focus_field().dlg() == _owner->dlg();
|
xvt_scr_set_focus_vobj(win());
|
||||||
if (has_focus)
|
mask().set_focus_win(win(), FALSE);
|
||||||
{
|
|
||||||
xvt_scr_set_focus_vobj(win());
|
|
||||||
mask().set_focus_win(win(), FALSE);
|
|
||||||
}
|
|
||||||
|
|
||||||
const int rec = row2rec(riga);
|
const int rec = row2rec(riga);
|
||||||
colonna = find_enabled_column(rec, colonna, +1);
|
colonna = find_enabled_column(rec, colonna, +1);
|
||||||
|
|
||||||
if (colonna > 0)
|
if (colonna > 0)
|
||||||
{
|
{
|
||||||
if (has_focus)
|
XI_OBJ cell;
|
||||||
{
|
XI_MAKE_CELL(&cell, _list, riga, colonna);
|
||||||
XI_OBJ cell;
|
xi_set_focus(&cell);
|
||||||
XI_MAKE_CELL(&cell, _list, riga, colonna);
|
|
||||||
xi_set_focus(&cell);
|
|
||||||
}
|
|
||||||
|
|
||||||
_edit_field = col2field(_cur_col = colonna);
|
_edit_field = col2field(_cur_col = colonna);
|
||||||
if (rec != _cur_rec)
|
if (rec != _cur_rec)
|
||||||
@ -1274,8 +1267,20 @@ void TSpreadsheet::select(int rec, bool scrollto)
|
|||||||
xi_scroll_rec(_list, rec, NORMAL_COLOR, XI_ATR_ENABLED | XI_ATR_AUTOSELECT, 0);
|
xi_scroll_rec(_list, rec, NORMAL_COLOR, XI_ATR_ENABLED | XI_ATR_AUTOSELECT, 0);
|
||||||
|
|
||||||
const int row = rec2row(rec);
|
const int row = rec2row(rec);
|
||||||
_cur_rec = -1;
|
const bool has_focus = mask().focus_field().dlg() == _owner->dlg();
|
||||||
set_focus_cell(row, 1);
|
if (has_focus)
|
||||||
|
{
|
||||||
|
_cur_rec = -1;
|
||||||
|
set_focus_cell(row, 1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_edit_field = col2field(_cur_col = 1);
|
||||||
|
_cur_rec = rec;
|
||||||
|
_cur_row = row;
|
||||||
|
str2mask(_cur_rec);
|
||||||
|
_row_dirty = FALSE;
|
||||||
|
}
|
||||||
notify(rec, K_TAB);
|
notify(rec, K_TAB);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user