> Please hold on. I propose instead to display the full TeX code in any case as 
discussed in
> bugzilla. I'll work on a patch.

I can't hold it, because this is so simple with the new infrastructure of my patch, here it is again - with displaying "\right" and "\left".

Abdel.

Index: frontends/qt4/QDelimiterDialog.C
===================================================================
--- frontends/qt4/QDelimiterDialog.C	(revision 17811)
+++ frontends/qt4/QDelimiterDialog.C	(working copy)
@@ -172,16 +172,30 @@
 }
 
 
+void QDelimiterDialog::on_leftLW_clicked()
+{
+	string str_left = fromqstr(leftLW->currentItem()->toolTip());
+	str_left = fix_name(str_left, true);
+
+	texCodeL->setText("TeX code: \\left" + qt_(str_left));
+}
+
+
+void QDelimiterDialog::on_rightLW_clicked()
+{
+	string str_right = fromqstr(rightLW->currentItem()->toolTip());
+	str_right = fix_name(str_right, true);
+
+	texCodeL->setText("TeX code: \\right" + qt_(str_right));
+}
+
+
 void QDelimiterDialog::on_leftLW_currentRowChanged(int item)
 {
 	if (matchCB->isChecked())
 		rightLW->setCurrentRow(item);
 
-	// Display the associated TeX name.
-	if (leftLW->currentRow() == leftLW->count() - 1)
-		texCodeL->clear();
-	else
-		texCodeL->setText("TeX code: \\" + leftLW->currentItem()->toolTip());
+	on_leftLW_clicked();
 }
 
 
@@ -190,11 +204,7 @@
 	if (matchCB->isChecked())
 		leftLW->setCurrentRow(item);
 
-	// Display the associated TeX name.
-	if (rightLW->currentRow() == leftLW->count() - 1)
-		texCodeL->clear();
-	else
-		texCodeL->setText("TeX code: \\" + rightLW->currentItem()->toolTip());
+	on_rightLW_clicked();
 }
 
 
Index: frontends/qt4/QDelimiterDialog.h
===================================================================
--- frontends/qt4/QDelimiterDialog.h	(revision 17811)
+++ frontends/qt4/QDelimiterDialog.h	(working copy)
@@ -30,6 +30,8 @@
 public Q_SLOTS:
 	void on_leftLW_itemActivated(QListWidgetItem *);
 	void on_rightLW_itemActivated(QListWidgetItem *);
+	void on_leftLW_clicked();
+	void on_rightLW_clicked();
 	void on_leftLW_currentRowChanged(int);
 	void on_rightLW_currentRowChanged(int);
 	void on_matchCB_stateChanged(int);

Reply via email to