It was not possible to insert a reference when there was only one label 
(because the refSelected slot immediately closed the dialog without applying 
the selected entry; this was only possible with refHighlighted, which only 
works with more than one entry).

The fix is crystal clear, so I gonna commit this now.

Jürgen
? ui/IndexModuleBase.ui
Index: ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/ChangeLog,v
retrieving revision 1.756
diff -u -r1.756 ChangeLog
--- ChangeLog	31 Jan 2005 15:26:39 -0000	1.756
+++ ChangeLog	10 Feb 2005 21:39:59 -0000
@@ -1,3 +1,9 @@
+2005-02-10  Jürgen Spitzmüller  <[EMAIL PROTECTED]>
+
+	* QRefDialog.C (refSelected): insert selected ref to 
+	text widget (this was not possible if there was only
+	one entry, an empty inset was generated).
+
 2005-01-31  Asger Ottar Alstrup  <[EMAIL PROTECTED]>
 
 	* QDialogView.h (form): add cast for MSVC.
Index: QRefDialog.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/QRefDialog.C,v
retrieving revision 1.17
diff -u -r1.17 QRefDialog.C
--- QRefDialog.C	2 Jun 2004 20:13:18 -0000	1.17
+++ QRefDialog.C	10 Feb 2005 21:40:00 -0000
@@ -70,8 +70,12 @@
 }
 
 
-void QRefDialog::refSelected(const QString &)
+void QRefDialog::refSelected(const QString & sel)
 {
+	if (form_->readOnly())
+		return;
+
+	referenceED->setText(sel);
 	// <enter> or double click, inserts ref and closes dialog
 	form_->slotOK();
 }

Reply via email to