mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 03:11:59 +00:00
* GuiSymbols.cpp:
- fix crash due to invalid ListWidgetItem. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22860 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
92b41f3f98
commit
faf2f10824
@ -245,8 +245,10 @@ void GuiSymbols::on_symbolsLW_itemClicked(QListWidgetItem * item)
|
||||
return;
|
||||
if (chosenLE->isEnabled())
|
||||
chosenLE->insert(text);
|
||||
QString const category = getBlock(text.data()->unicode());
|
||||
categoryCO->setCurrentIndex(categoryCO->findText(category));
|
||||
if (categoryFilterCB->isChecked()) {
|
||||
QString const category = getBlock(text.data()->unicode());
|
||||
categoryCO->setCurrentIndex(categoryCO->findText(category));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -254,7 +256,7 @@ void GuiSymbols::on_categoryCO_activated(QString const & text)
|
||||
{
|
||||
if (!categoryFilterCB->isChecked())
|
||||
updateSymbolList(false);
|
||||
if (used_blocks.find(text) != used_blocks.end())
|
||||
else if (used_blocks.find(text) != used_blocks.end())
|
||||
symbolsLW->scrollToItem(used_blocks[text],
|
||||
QAbstractItemView::PositionAtTop);
|
||||
}
|
||||
@ -262,7 +264,7 @@ void GuiSymbols::on_categoryCO_activated(QString const & text)
|
||||
|
||||
void GuiSymbols::on_categoryFilterCB_toggled(bool on)
|
||||
{
|
||||
updateSymbolList(false);
|
||||
updateSymbolList(on);
|
||||
if (on) {
|
||||
QString const category = categoryCO->currentText();
|
||||
if (used_blocks.find(category) != used_blocks.end())
|
||||
|
Loading…
Reference in New Issue
Block a user