mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Allow to hide categories in CategorizedCombo
font combos do not need that
This commit is contained in:
parent
6656dd2275
commit
b260ff8b27
@ -476,13 +476,13 @@ bool CategorizedCombo::set(QString const & item)
|
||||
void CategorizedCombo::addItemSort(QString const & item, QString const & guiname,
|
||||
QString const & category, QString const & tooltip,
|
||||
bool sorted, bool sortedByCat, bool sortCats,
|
||||
bool available)
|
||||
bool available, bool nocategories)
|
||||
{
|
||||
QString titem = available ? guiname
|
||||
: toqstr(bformat(_("Unavailable: %1$s"),
|
||||
qstring_to_ucs4(guiname)));
|
||||
bool const uncategorized = category.isEmpty();
|
||||
QString qcat = uncategorized ? qt_("Uncategorized") : category;
|
||||
QString qcat = (uncategorized && !nocategories) ? qt_("Uncategorized") : category;
|
||||
|
||||
QList<QStandardItem *> row;
|
||||
QStandardItem * gui = new QStandardItem(titem);
|
||||
|
@ -49,7 +49,7 @@ public:
|
||||
void addItemSort(QString const & item, QString const & guiname,
|
||||
QString const & category, QString const & tooltip,
|
||||
bool sorted, bool sortedByCat, bool sortCats,
|
||||
bool available);
|
||||
bool available, bool nocategories = false);
|
||||
///
|
||||
QString getData(int row) const;
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user