From b2246c4ea295bb93923a9a9c47faba73f69b8a9f Mon Sep 17 00:00:00 2001 From: Alfredo Braunstein Date: Mon, 13 Oct 2014 10:59:50 +0200 Subject: [PATCH] insets/InsetTabular.cpp (doDispatch): fix to #9291. The problem was simply that the default status for the cursor in the call to *::doDispatch is "dispatched". insets/InsetTabular.cpp (edit): do not reset the selection --- src/insets/InsetTabular.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp index 2a9c7e64b7..de9f862576 100644 --- a/src/insets/InsetTabular.cpp +++ b/src/insets/InsetTabular.cpp @@ -3875,7 +3875,7 @@ void InsetTabular::edit(Cursor & cur, bool front, EntryDirection) { //lyxerr << "InsetTabular::edit: " << this << endl; cur.finishUndo(); - cur.setSelection(false); + //cur.setSelection(false); cur.push(*this); if (front) { if (isRightToLeft(cur)) @@ -4155,9 +4155,10 @@ void InsetTabular::doDispatch(Cursor & cur, FuncRequest & cmd) else movePrevCell(cur, entry_from); // if we're exiting the table, call the appropriate FINISHED lfun - if (sl == cur.top()) + if (sl == cur.top()) { cmd = FuncRequest(finish_lfun); - else + cur.undispatched(); + } else cur.dispatched(); cur.screenUpdateFlags(Update::Force | Update::FitCursor); @@ -6442,7 +6443,8 @@ string InsetTabular::params2string(InsetTabular const & inset) } -void InsetTabular::setLayoutForHiddenCells(DocumentClass const & dc) { +void InsetTabular::setLayoutForHiddenCells(DocumentClass const & dc) +{ for (Tabular::col_type c = 0; c < tabular.ncols(); ++c) { for (Tabular::row_type r = 0; r < tabular.nrows(); ++r) { if (!tabular.isPartOfMultiColumn(r,c) && -- 2.39.2