Skip to content
Browse files

settings: fix listing of invisible categories and groups

  • Loading branch information...
1 parent ae50113 commit abf0372217bb0c40a027a3f099b00030030eb630 @Montellese Montellese committed Aug 28, 2013
Showing with 8 additions and 5 deletions.
  1. +2 −2 xbmc/settings/SettingSection.cpp
  2. +6 −3 xbmc/settings/SettingSection.h
View
4 xbmc/settings/SettingSection.cpp
@@ -221,7 +221,7 @@ SettingGroupList CSettingCategory::GetGroups(SettingLevel level) const
for (SettingGroupList::const_iterator it = m_groups.begin(); it != m_groups.end(); ++it)
{
- if ((*it)->MeetsRequirements() && (*it)->GetSettings(level).size() > 0)
+ if ((*it)->MeetsRequirements() && (*it)->IsVisible() && (*it)->GetSettings(level).size() > 0)
groups.push_back(*it);
}
@@ -307,7 +307,7 @@ SettingCategoryList CSettingSection::GetCategories(SettingLevel level) const
for (SettingCategoryList::const_iterator it = m_categories.begin(); it != m_categories.end(); ++it)
{
- if ((*it)->MeetsRequirements() && (*it)->GetGroups(level).size() > 0)
+ if ((*it)->MeetsRequirements() && (*it)->IsVisible() && (*it)->GetGroups(level).size() > 0)
categories.push_back(*it);
}
View
9 xbmc/settings/SettingSection.h
@@ -57,7 +57,8 @@ class CSettingGroup : public ISetting
const SettingList& GetSettings() const { return m_settings; }
/*!
\brief Gets the list of settings assigned to the given setting level (or
- below) belonging to the setting group.
+ below) and that meet the requirements conditions belonging to the setting
+ group.
\param level Level the settings should be assigned to
\return List of settings belonging to the setting group
@@ -112,7 +113,8 @@ class CSettingCategory : public ISetting
const SettingGroupList& GetGroups() const { return m_groups; }
/*!
\brief Gets the list of setting groups belonging to the setting category
- that contain settings assigned to the given setting level (or below).
+ that contain settings assigned to the given setting level (or below) and
+ that meet the requirements and visibility conditions.
\param level Level the settings should be assigned to
\return List of setting groups belonging to the setting category
@@ -177,7 +179,8 @@ class CSettingSection : public ISetting
const SettingCategoryList& GetCategories() const { return m_categories; }
/*!
\brief Gets the list of setting categories belonging to the setting section
- that contain settings assigned to the given setting level (or below).
+ that contain settings assigned to the given setting level (or below) and
+ that meet the requirements and visibility conditions.
\param level Level the settings should be assigned to
\return List of setting categories belonging to the setting section

0 comments on commit abf0372

Please sign in to comment.
Something went wrong with that request. Please try again.