summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorTom Cooksey <thomas.cooksey@nokia.com>2010-04-19 10:53:00 (GMT)
committerTom Cooksey <thomas.cooksey@nokia.com>2010-04-23 06:38:26 (GMT)
commit387f3c10a9297b12e8f03c630d283abbe4caf22f (patch)
tree6e0cea76acc7b02d5c07eaa2305cf4676e734bd2 /src/gui/widgets
parent2dc7fa153b39f7d3b5e88a50122d2135d55b4ea9 (diff)
downloadQt-387f3c10a9297b12e8f03c630d283abbe4caf22f.zip
Qt-387f3c10a9297b12e8f03c630d283abbe4caf22f.tar.gz
Qt-387f3c10a9297b12e8f03c630d283abbe4caf22f.tar.bz2
Minor optimisation in QMenu
Stops the QMenu re-painting itself for every mouse move event. Reviewed-By: gabi
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/qmenu.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/widgets/qmenu.cpp b/src/gui/widgets/qmenu.cpp
index f9b132e..c157a2f 100644
--- a/src/gui/widgets/qmenu.cpp
+++ b/src/gui/widgets/qmenu.cpp
@@ -2812,7 +2812,7 @@ void QMenu::mouseMoveEvent(QMouseEvent *e)
if (d->sloppyRegion.contains(e->pos())) {
d->sloppyAction = action;
QMenuPrivate::sloppyDelayTimer = startTimer(style()->styleHint(QStyle::SH_Menu_SubMenuPopupDelay, 0, this)*6);
- } else {
+ } else if (action != d->currentAction) {
d->setCurrentAction(action, style()->styleHint(QStyle::SH_Menu_SubMenuPopupDelay, 0, this));
}
}