src/hbcore/gui/hbmenuitem_p.cpp
changeset 28 b7da29130b0e
parent 21 4633027730f5
child 30 80e4d18b72f5
--- a/src/hbcore/gui/hbmenuitem_p.cpp	Thu Sep 02 20:44:51 2010 +0300
+++ b/src/hbcore/gui/hbmenuitem_p.cpp	Fri Sep 17 08:32:10 2010 +0300
@@ -394,4 +394,17 @@
     }
 }
 
+/*!
+    \reimp
+ */
+QVariant HbMenuItem::itemChange(GraphicsItemChange change, const QVariant &value)
+{
+    // Remove highlighting on a menuitem when the menu disappears.
+    if (change == QGraphicsItem::ItemVisibleHasChanged && !value.toBool()) {
+        pressStateChanged(false);
+    }
+
+    return HbWidget::itemChange(change, value);
+}
+
 #include "moc_hbmenuitem_p.cpp"