>>>>> "Juergen" == Juergen Spitzmueller <[EMAIL PROTECTED]> writes:
Juergen> Inspired by a recent thread on lyx-users, and because I have
Juergen> to do an index for a book myself ATM, I have fixed the
Juergen> behaviour of index insertion when there is text selected. By
Juergen> now, the selected text has been cut and pasted into the index
Juergen> inset, which does not make much sense (and is actually a bug
Juergen> IMO). The patch ensures that it is only copied. So if you
Juergen> have a word like lyx-devel, you can make an index entry by
Juergen> selecting it and do Indert->Index.
The patch is wrong, because the index is not populated by LFUN_PASTE
(there is no underlying text inset). Try this one instead.
JMarc
Index: src/text3.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/text3.C,v
retrieving revision 1.29.2.3
diff -u -p -r1.29.2.3 text3.C
--- src/text3.C 29 Dec 2003 13:27:26 -0000 1.29.2.3
+++ src/text3.C 25 Nov 2005 13:05:26 -0000
@@ -383,14 +383,14 @@ void doInsertInset(LyXText * lt, FuncReq
if (inset) {
bool gotsel = false;
- if (lt->selection.set()) {
+ if (lt->selection.set() && pastesel) {
bv->owner()->dispatch(FuncRequest(LFUN_CUT));
gotsel = true;
}
if (bv->insertInset(inset)) {
if (edit)
inset->edit(bv);
- if (gotsel && pastesel)
+ if (gotsel)
bv->owner()->dispatch(FuncRequest(LFUN_PASTE));
}
else