@@ -110,6 +110,11 @@ UnityMenuModel* UnityMenuModelStack::tail() const
110110 return !m_menuModels.isEmpty() ? m_menuModels.last()->model() : NULL;
111111}
112112
113+int UnityMenuModelStack::count() const
114+{
115+ return m_menuModels.count();
116+}
117+
113118void UnityMenuModelStack::push(UnityMenuModel* model, int index)
114119{
115120 UnityMenuModelEntry* entry = new UnityMenuModelEntry(model, tail(), index);
@@ -117,6 +122,7 @@ void UnityMenuModelStack::push(UnityMenuModel* model, int index)
117122
118123 m_menuModels << entry;
119124 Q_EMIT tailChanged(model);
125+ Q_EMIT countChanged(m_menuModels.count());
120126}
121127
122128UnityMenuModel* UnityMenuModelStack::pop()
@@ -132,6 +138,7 @@ UnityMenuModel* UnityMenuModelStack::pop()
132138 if (m_menuModels.isEmpty()) {
133139 Q_EMIT headChanged(NULL);
134140 }
141+ Q_EMIT countChanged(m_menuModels.count());
135142
136143 return model;
137144}