From 7d027a446d61c9aa46365486f03755bf8a6db9d2 Mon Sep 17 00:00:00 2001 From: Mikaƫl Capelle Date: Thu, 14 Jan 2021 21:16:56 +0100 Subject: Add settings to enable/disable icons on collapsed separators. --- src/modlistview.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/modlistview.cpp') diff --git a/src/modlistview.cpp b/src/modlistview.cpp index 9cc6d8b8..9f3a1266 100644 --- a/src/modlistview.cpp +++ b/src/modlistview.cpp @@ -787,7 +787,7 @@ void ModListView::setup(OrganizerCore& core, CategoryFactory& factory, MainWindo setItemDelegateForColumn(ModList::COL_FLAGS, new ModFlagIconDelegate(this, ModList::COL_FLAGS, 120)); setItemDelegateForColumn(ModList::COL_CONFLICTFLAGS, new ModConflictIconDelegate(this, ModList::COL_CONFLICTFLAGS, 80)); setItemDelegateForColumn(ModList::COL_CONTENT, new ModContentIconDelegate(this, ModList::COL_CONTENT, 150)); - setItemDelegateForColumn(ModList::COL_VERSION, new ModListVersionDelegate(this)); + setItemDelegateForColumn(ModList::COL_VERSION, new ModListVersionDelegate(this, core.settings())); if (m_core->settings().geometry().restoreState(header())) { // hack: force the resize-signal to be triggered because restoreState doesn't seem to do that @@ -1140,6 +1140,7 @@ std::vector ModListView::modFlags(const QModelIndex& index, bool bool compact = false; if (info->isSeparator() && hasCollapsibleSeparators() + && m_core->settings().interface().collapsibleSeparatorsIcons(ModList::COL_FLAGS) && !isExpanded(index.sibling(index.row(), 0))) { // combine the child conflicts @@ -1170,6 +1171,7 @@ std::vector ModListView::conflictFlags(const QModelIndex bool compact = false; if (info->isSeparator() && hasCollapsibleSeparators() + && m_core->settings().interface().collapsibleSeparatorsIcons(ModList::COL_CONFLICTFLAGS) && !isExpanded(index.sibling(index.row(), 0))) { // combine the child conflicts @@ -1204,6 +1206,7 @@ std::set ModListView::contents(const QModelIndex& index, bool* includeChild if (info->isSeparator() && hasCollapsibleSeparators() + && m_core->settings().interface().collapsibleSeparatorsIcons(ModList::COL_CONTENT) && !isExpanded(index.sibling(index.row(), 0))) { // combine the child contents -- cgit v1.3.1