use accessor functions if possible

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8917 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2004-08-13 22:48:48 +00:00
parent 596a2ca159
commit 7914e9c401

View File

@ -533,7 +533,7 @@ void InsetTabular::priv_dispatch(LCursor & cur, FuncRequest & cmd)
int actcol = tabular.column_of_cell(actcell); int actcol = tabular.column_of_cell(actcell);
int column = actcol; int column = actcol;
if (cur.bv().top_y() + cur.bv().painter().paperHeight() if (cur.bv().top_y() + cur.bv().painter().paperHeight()
< yo_ + tabular.getHeightOfTabular()) < yo() + tabular.getHeightOfTabular())
{ {
cur.bv().scrollDocView( cur.bv().scrollDocView(
cur.bv().top_y() + cur.bv().painter().paperHeight()); cur.bv().top_y() + cur.bv().painter().paperHeight());
@ -549,10 +549,10 @@ void InsetTabular::priv_dispatch(LCursor & cur, FuncRequest & cmd)
//if (hasSelection()) //if (hasSelection())
// cur.selection() = false; // cur.selection() = false;
int column = tabular.column_of_cell(cur.idx()); int column = tabular.column_of_cell(cur.idx());
if (yo_ < 0) { if (yo() < 0) {
cur.bv().scrollDocView( cur.bv().scrollDocView(
cur.bv().top_y() - cur.bv().painter().paperHeight()); cur.bv().top_y() - cur.bv().painter().paperHeight());
if (yo_ > 0) if (yo() > 0)
cur.idx() = column; cur.idx() = column;
else else
cur.idx() = tabular.getCellBelow(first_visible_cell) + column; cur.idx() = tabular.getCellBelow(first_visible_cell) + column;