settings: fix listing of invisible categories and groups
authormontellese <montellese@xbmc.org>
Wed, 28 Aug 2013 12:14:06 +0000 (14:14 +0200)
committermontellese <montellese@xbmc.org>
Thu, 29 Aug 2013 06:04:44 +0000 (08:04 +0200)
xbmc/settings/SettingSection.cpp
xbmc/settings/SettingSection.h

index dd5d549..8cfbca0 100644 (file)
@@ -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);
   }
 
index 65bc644..81cc514 100644 (file)
@@ -57,7 +57,8 @@ public:
   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 @@ public:
   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 @@ public:
   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