@@ -39,6 +39,7 @@ Scope::Scope(QString const& id, QString const& name, bool favorite, Scopes* pare
39 , m_searching(false)
39 , m_searching(false)
40 , m_favorite(favorite)
40 , m_favorite(favorite)
41 , m_isActive(false)
41 , m_isActive(false)
42+ , m_hasBeenActive(false)
42 , m_hasNavigation(true)
43 , m_hasNavigation(true)
43 , m_hasPrimaryFilter(true)
44 , m_hasPrimaryFilter(true)
44 , m_currentNavigationId("root")
45 , m_currentNavigationId("root")
@@ -108,7 +109,7 @@ bool Scope::favorite() const
109unity::shell::scopes::CategoriesInterface* Scope::categories() const
110unity::shell::scopes::CategoriesInterface* Scope::categories() const
111− return m_categories;
112+ return m_hasBeenActive ? m_categories : nullptr;
114unity::shell::scopes::SettingsModelInterface* Scope::settings() const
115unity::shell::scopes::SettingsModelInterface* Scope::settings() const
@@ -153,6 +154,10 @@ void Scope::setActive(const bool active)
153 m_isActive = active;
154 m_isActive = active;
154 Q_EMIT isActiveChanged();
155 Q_EMIT isActiveChanged();
157+ if (active && !m_hasBeenActive) {
158+ m_hasBeenActive = true;
159+ Q_EMIT categoriesChanged();
158void Scope::setFavorite(const bool favorite)
163void Scope::setFavorite(const bool favorite)