do not eat the selection when inserting an index entry

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_3_X@10636 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2005-11-30 15:51:17 +00:00
parent 0f5ab344ee
commit e9599fc741
2 changed files with 16 additions and 1 deletions

View File

@ -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-02 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
* lyxlength.h: undefine macros that clash with solaris/x86 (bug 992)

View File

@ -1614,6 +1614,17 @@ Inset::RESULT LyXText::dispatch(FuncRequest const & cmd)
break;
}
case LFUN_INDEX_INSERT: {
Inset * inset = createInset(cmd);
if (inset) {
BufferView * bv = cmd.view();
if (bv->insertInset(inset))
inset->edit(bv);
else
delete inset;
}
break;
}
#if 0
case LFUN_INSET_LIST:
@ -1637,7 +1648,6 @@ Inset::RESULT LyXText::dispatch(FuncRequest const & cmd)
case LFUN_INSERT_URL:
case LFUN_INSET_EXTERNAL:
case LFUN_INDEX_INSERT:
// Just open the inset
doInsertInset(this, cmd, true, false);
break;