Attached is a batch for bug 2907
http://bugzilla.lyx.org/show_bug.cgi?id=2907

It shows the index dialog like in LyX 1.3.x and previous.

The code is stolen from LFUN_NOMENCL_INSERT and works as expected.
If there are no objections, can this go into branch?

regards Uwe
Index: Text3.cpp
===================================================================
--- Text3.cpp	(revision 20172)
+++ Text3.cpp	(working copy)
@@ -1289,7 +1289,21 @@
 		break;
 	}
 
-	case LFUN_INDEX_INSERT:
+	case LFUN_INDEX_INSERT:	{
+		Inset * inset = createInset(&cur.bv(), cmd);
+		if (!inset)
+			break;
+		insertInset(cur, inset);
+		inset->edit(cur, true);
+		// Show the dialog for the index entry, because it
+		// needs to be modified in most instances
+		if (cmd.action == LFUN_INDEX_INSERT)
+			InsetCommandMailer("index",
+				*reinterpret_cast<InsetCommand *>(inset)).showDialog(&cur.bv());
+		cur.posRight();
+		break;
+	}
+
 	case LFUN_NOMENCL_INSERT: {
 		Inset * inset = createInset(&cur.bv(), cmd);
 		if (!inset)

Reply via email to