remove redundant code

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3171 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Allan Rae 2001-12-10 01:22:12 +00:00
parent c307b3bd88
commit 8f0d715464
2 changed files with 7 additions and 13 deletions

View File

@ -1,3 +1,7 @@
2001-12-10 Allan Rae <rae@lyx.org>
* insettabular.C (localDispatch): cleanup unlockInsetInInset calls
2001-12-05 John Levon <moz@compsoc.man.ac.uk> 2001-12-05 John Levon <moz@compsoc.man.ac.uk>
* insettext.C (insetAllowed): add comment * insettext.C (insetAllowed): add comment

View File

@ -847,10 +847,7 @@ InsetTabular::localDispatch(BufferView * bv, kb_action action,
case LFUN_SHIFT_TAB: case LFUN_SHIFT_TAB:
case LFUN_TAB: case LFUN_TAB:
hideInsetCursor(bv); hideInsetCursor(bv);
if (the_locking_inset) { unlockInsetInInset(bv, the_locking_inset);
unlockInsetInInset(bv, the_locking_inset);
the_locking_inset = 0;
}
if (action == LFUN_TAB) if (action == LFUN_TAB)
moveNextCell(bv, old_locking_inset != 0); moveNextCell(bv, old_locking_inset != 0);
else else
@ -962,10 +959,7 @@ InsetTabular::localDispatch(BufferView * bv, kb_action action,
break; break;
case LFUN_NEXT: { case LFUN_NEXT: {
int column = actcol; int column = actcol;
if (the_locking_inset) { unlockInsetInInset(bv, the_locking_inset);
unlockInsetInInset(bv, the_locking_inset);
the_locking_inset = 0;
}
if (bv->text->first + bv->painter().paperHeight() < if (bv->text->first + bv->painter().paperHeight() <
(top_baseline + tabular->GetHeightOfTabular())) (top_baseline + tabular->GetHeightOfTabular()))
{ {
@ -981,10 +975,7 @@ InsetTabular::localDispatch(BufferView * bv, kb_action action,
} }
case LFUN_PRIOR: { case LFUN_PRIOR: {
int column = actcol; int column = actcol;
if (the_locking_inset) { unlockInsetInInset(bv, the_locking_inset);
unlockInsetInInset(bv, the_locking_inset);
the_locking_inset = 0;
}
if (top_baseline < 0) { if (top_baseline < 0) {
bv->scrollCB(bv->text->first - bv->painter().paperHeight()); bv->scrollCB(bv->text->first - bv->painter().paperHeight());
updateLocal(bv, FULL, false); updateLocal(bv, FULL, false);
@ -1133,7 +1124,6 @@ InsetTabular::localDispatch(BufferView * bv, kb_action action,
if ((result == UNDISPATCHED) || (result >= FINISHED)) { if ((result == UNDISPATCHED) || (result >= FINISHED)) {
unlockInsetInInset(bv, the_locking_inset); unlockInsetInInset(bv, the_locking_inset);
nodraw(false); nodraw(false);
the_locking_inset = 0;
// we need to update if this was requested before // we need to update if this was requested before
updateLocal(bv, NONE, false); updateLocal(bv, NONE, false);
return UNDISPATCHED; return UNDISPATCHED;