mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-26 22:17:41 +00:00
do not eat the selection when inserting an index entry
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10635 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
2688ee7626
commit
4f8b86badf
@ -1,3 +1,8 @@
|
||||
2005-11-29 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
|
||||
|
||||
* text3.C (dispatch/LFUN_INDEX_INSERT): when a selection is set,
|
||||
do not remove it (this inset behaves differently from the others).
|
||||
|
||||
2005-11-29 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
|
||||
|
||||
Fix bug 2096.
|
||||
|
13
src/text3.C
13
src/text3.C
@ -1220,11 +1220,18 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
|
||||
cur.dispatch(FuncRequest(LFUN_LAYOUT, "Caption"));
|
||||
break;
|
||||
|
||||
case LFUN_INDEX_INSERT:
|
||||
// Just open the inset
|
||||
doInsertInset(cur, this, cmd, true, false);
|
||||
case LFUN_INDEX_INSERT: {
|
||||
InsetBase * inset = createInset(&cur.bv(), cmd);
|
||||
if (!inset)
|
||||
break;
|
||||
|
||||
recordUndo(cur);
|
||||
cur.clearSelection();
|
||||
insertInset(cur, inset);
|
||||
inset->edit(cur, true);
|
||||
cur.posRight();
|
||||
break;
|
||||
}
|
||||
|
||||
case LFUN_INDEX_PRINT:
|
||||
case LFUN_TOC_INSERT:
|
||||
|
Loading…
Reference in New Issue
Block a user