]> git.lyx.org Git - features.git/commitdiff
* GuiSymbols.cpp:
authorJürgen Spitzmüller <spitz@lyx.org>
Thu, 7 Feb 2008 18:29:45 +0000 (18:29 +0000)
committerJürgen Spitzmüller <spitz@lyx.org>
Thu, 7 Feb 2008 18:29:45 +0000 (18:29 +0000)
- fix thinko and ensure visibility on filter toggling.

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

src/frontends/qt4/GuiSymbols.cpp

index 77752ae6bd880d8659504a3b387305fae8e476fb..8f6088f7ad3ba078c8b3edada30d2594ef7fddac 100644 (file)
@@ -243,9 +243,15 @@ void GuiSymbols::on_categoryCO_activated(QString const & text)
 }
 
 
-void GuiSymbols::on_categoryFilterCB_toggled(bool)
+void GuiSymbols::on_categoryFilterCB_toggled(bool on)
 {
        updateSymbolList();
+       if (on) {
+               QString const category = categoryCO->currentText();
+               if (used_blocks.find(category) != used_blocks.end())
+                       symbolsLW->scrollToItem(used_blocks[category],
+                               QAbstractItemView::PositionAtTop);
+       }
 }
 
 
@@ -282,7 +288,7 @@ void GuiSymbols::updateSymbolList()
                        continue;
                QListWidgetItem * lwi = new QListWidgetItem(
                        QString::fromUcs4((uint const *) &c, 1));
-               if (show_all || c > range_start && c < range_end) {
+               if (show_all || c >= range_start && c <= range_end) {
                        lwi->setTextAlignment(Qt::AlignCenter);
                        symbolsLW->addItem(lwi);
                }