Fix bug 3363: mark buffer dirty after middle button paste in plain text and table; set cursor at the end of pasted text

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18632 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Bo Peng 2007-06-02 13:34:06 +00:00
parent 55a07f0e00
commit 9506a284d1
2 changed files with 6 additions and 3 deletions

View File

@ -1022,9 +1022,6 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
paste_internally = true;
}
// we have to update after dePM triggered
bool update = bv->mouseSetCursor(cur);
// Insert primary selection with middle mouse
// if there is a local selection in the current buffer,
// insert this
@ -1034,11 +1031,15 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
bv->buffer()->errors("Paste");
cur.clearSelection(); // bug 393
bv->switchKeyMap();
bv->buffer()->markDirty();
finishUndo();
} else
lyx::dispatch(FuncRequest(LFUN_PRIMARY_SELECTION_PASTE, "paragraph"));
}
// we have to update after dePM triggered
bool update = bv->mouseSetCursor(cur);
if (!update && cmd.button() == mouse_button::button1) {
needsUpdate = false;
cur.noUpdate();

View File

@ -3212,6 +3212,8 @@ void InsetTabular::doDispatch(Cursor & cur, FuncRequest & cmd)
"paragraph");
}
doDispatch(cur, cmd);
cur.bv().buffer()->markDirty();
cur.bv().mouseSetCursor(cur);
}
break;