Clear selection on PgUp/Down in tabulars (fix #216).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3605 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Vigna 2002-02-28 12:02:19 +00:00
parent 01df791351
commit 3c599a8c2a
3 changed files with 22 additions and 4 deletions

View File

@ -98,6 +98,8 @@ src/frontends/xforms/form_filedialog.C
src/frontends/xforms/FormFiledialog.C
src/frontends/xforms/form_float.C
src/frontends/xforms/FormFloat.C
src/frontends/xforms/form_forks.C
src/frontends/xforms/FormForks.C
src/frontends/xforms/form_graphics.C
src/frontends/xforms/FormGraphics.C
src/frontends/xforms/form_include.C
@ -151,6 +153,8 @@ src/frontends/xforms/input_validators.C
src/frontends/xforms/Menubar_pimpl.C
src/frontends/xforms/xforms_helpers.C
src/gettext.h
src/graphics/GraphicsCacheItem.C
src/graphics/GraphicsConverter.C
src/importer.C
src/insets/figinset.C
src/insets/insetbib.C

View File

@ -1,3 +1,7 @@
2002-02-28 Juergen Vigna <jug@sad.it>
* insettabular.C (localDispatch): clear selection on PgUp/Down.
2002-02-28 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
* inset.h: ... and add a better one here.

View File

@ -1031,27 +1031,37 @@ InsetTabular::localDispatch(BufferView * bv, kb_action action,
updateLocal(bv, SELECTION, false);
break;
case LFUN_NEXT: {
UpdateCodes code = CURSOR;
if (hs) {
clearSelection();
code = SELECTION;
}
int column = actcol;
unlockInsetInInset(bv, the_locking_inset);
if (bv->text->first + bv->painter().paperHeight() <
(top_baseline + tabular->GetHeightOfTabular()))
{
bv->scrollCB(bv->text->first + bv->painter().paperHeight());
updateLocal(bv, FULL, false);
code = FULL;
actcell = tabular->GetCellBelow(first_visible_cell) + column;
} else {
actcell = tabular->GetFirstCellInRow(tabular->rows() - 1) + column;
}
resetPos(bv);
updateLocal(bv, CURSOR, false);
updateLocal(bv, code, false);
break;
}
case LFUN_PRIOR: {
UpdateCodes code = CURSOR;
if (hs) {
clearSelection();
code = SELECTION;
}
int column = actcol;
unlockInsetInInset(bv, the_locking_inset);
if (top_baseline < 0) {
bv->scrollCB(bv->text->first - bv->painter().paperHeight());
updateLocal(bv, FULL, false);
code = FULL;
if (top_baseline > 0)
actcell = column;
else
@ -1060,7 +1070,7 @@ InsetTabular::localDispatch(BufferView * bv, kb_action action,
actcell = column;
}
resetPos(bv);
updateLocal(bv, CURSOR, false);
updateLocal(bv, code, false);
break;
}
// none of these make sense for insettabular,