src/hbplugins/devicedialogs/indicatormenuplugin/hbindicatormenucontent.cpp
changeset 5 627c4a0fd0e7
parent 2 06ff229162e9
child 21 4633027730f5
child 34 ed14f46c0e55
--- a/src/hbplugins/devicedialogs/indicatormenuplugin/hbindicatormenucontent.cpp	Thu May 27 13:10:59 2010 +0300
+++ b/src/hbplugins/devicedialogs/indicatormenuplugin/hbindicatormenucontent.cpp	Fri Jun 11 13:58:22 2010 +0300
@@ -152,6 +152,19 @@
      return indicatorModel.rowCount();
 }
 
+void HbIndicatorMenuContent::handleAboutToShow()
+{
+    for (int i = 0; i < mIndicatorList->model()->rowCount(); ++i) {
+        HbIndicatorInterface *indicator =
+            indicatorFromIndex(indicatorModel.item(i)->index());
+        if (indicator) {
+            if (indicator->refreshData()) {
+                setData(indicator, indicatorModel.item(i)->index());
+            }
+        }
+    }
+}
+
 void HbIndicatorMenuContent::updatePrimitives()
 {
     repolish();
@@ -233,12 +246,12 @@
     int index = listIndexFromIndicator(indicatorRemoved);
     if (index >= 0) {
         indicatorModel.removeRow(index);
+        //update indices.
+        for(int i = indicatorRemoved->category()+1; i < IndicatorTypes;++i){
+            mGroupTypeIndeces[i]--;
+        }
+        repolish();
     }
-    //update indices.
-    for(int i = indicatorRemoved->category()+1; i < IndicatorTypes;++i){
-        mGroupTypeIndeces[i]--;
-    }
-    repolish();
 }
 
 //data changed inside indicator.