]> git.lyx.org Git - features.git/commitdiff
Fix bug 3460:
authorAbdelrazak Younes <younes@lyx.org>
Thu, 19 Apr 2007 08:22:41 +0000 (08:22 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Thu, 19 Apr 2007 08:22:41 +0000 (08:22 +0000)
http://bugzilla.lyx.org/show_bug.cgi?id=3460

The problem was that the list_items map is ordered by key.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17858 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/QDelimiterDialog.C

index 3cb3348bd398002a4ef0a4295fed029af5bf86cd..f0eb2548a3803028d0f74ca1a4033ac2d2adf5ce 100644 (file)
@@ -113,14 +113,15 @@ QDelimiterDialog::QDelimiterDialog(QMathDelimiter * form)
                QFont const & symbol_font = guiApp->guiFontLoader().get(lyxfont);
                lwi->setFont(symbol_font);
                list_items[ms.unicode] = lwi;
+               leftLW->addItem(lwi);
        }
 
-       ListItems::const_iterator it = list_items.begin();
-       ListItems::const_iterator it_end = list_items.end();
-       for (; it != it_end; ++it) {
-               leftLW->addItem(it->second);
-               rightLW->addItem(list_items[doMatch(it->first)]->clone());
+       for (int i = 0; i != leftLW->count(); ++i) {
+               MathSymbol const & ms = form_->controller().mathSymbol(
+                       fromqstr(leftLW->item(i)->toolTip()));
+               rightLW->addItem(list_items[doMatch(ms.unicode)]->clone());
        }
+
        // The last element is the empty one.
        leftLW->addItem(qt_("(None)"));
        rightLW->addItem(qt_("(None)"));