diff options
| author | Mikaël Capelle <capelle.mikael@gmail.com> | 2020-05-27 22:01:36 +0200 |
|---|---|---|
| committer | Mikaël Capelle <capelle.mikael@gmail.com> | 2020-05-27 22:01:36 +0200 |
| commit | 6f22a77cdac588abcb60ac4c45d795b74872c626 (patch) | |
| tree | 6453b6b65c43e3f90c5080e342e324956a610ed6 | |
| parent | 9c3ddb53c9042ead731fcbfcf9daf9fec60dbbf7 (diff) | |
Do not show Content with isOnlyForFilter() in the column.
| -rw-r--r-- | src/modlist.cpp | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/modlist.cpp b/src/modlist.cpp index e71bff14..7fa63b54 100644 --- a/src/modlist.cpp +++ b/src/modlist.cpp @@ -183,10 +183,13 @@ QVariantList ModList::contentsToIcons(const std::vector<int> &contents) const QVariantList result; std::set<int> contentsSet(contents.begin(), contents.end()); for (auto &content: m_Organizer->modDataContents()) { - if (contentsSet.find(content.id()) != contentsSet.end()) { - result.append(content.icon()); - } else { - result.append(QString()); + if (!content.isOnlyForFilter()) { + if (contentsSet.find(content.id()) != contentsSet.end()) { + result.append(content.icon()); + } + else { + result.append(QString()); + } } } return result; @@ -198,7 +201,7 @@ QString ModList::contentsToToolTip(const std::vector<int> &contents) const std::set<int> contentsSet(contents.begin(), contents.end()); for (auto& content : m_Organizer->modDataContents()) { - if (contentsSet.find(content.id()) != contentsSet.end()) { + if (!content.isOnlyForFilter() && contentsSet.find(content.id()) != contentsSet.end()) { result.append(QString("<tr><td><img src=\"%1\" width=32/></td>" "<td valign=\"middle\">%2</td></tr>") .arg(content.icon()).arg(content.name())); @@ -1325,8 +1328,10 @@ QString ModList::getColumnToolTip(int column) const } QString result = tr("Depicts the content of the mod:") + "<br>" + "<table cellspacing=7>"; for (auto& content : contents) { - result += QString("<tr><td><img src=\"%1\" width=32/></td><td>%2</td></tr>") - .arg(content.icon()).arg(content.name()); + if (!content.isOnlyForFilter()) { + result += QString("<tr><td><img src=\"%1\" width=32/></td><td>%2</td></tr>") + .arg(content.icon()).arg(content.name()); + } } return result + "</table>"; }; |
