diff options
author | Chris Skluzacek <cskludev@gmail.com> | 2010-07-22 18:04:20 +0300 |
---|---|---|
committer | Tomas Junnonen <tomas.junnonen@nokia.com> | 2010-08-06 15:04:31 +0300 |
commit | 115a31ecb5d4c5c9b17e99cd3287bb4c2a090d18 (patch) | |
tree | ee9c1cd938479aedbddded8d0113b878ce42f40a | |
parent | 6569baff585bc685905a991df7b03f56a28ca1a3 (diff) |
Fixes: NB#177415 - Enabling/disabling an MAction after creating it is not possible
RevBy: Dénes Dezsö, Tomas Junnonen
Details: The widget in the AppMenu was only being synchronized with
its associated action when the widget was a button. This synchronizes
the enabled state for all widget types.
-rw-r--r-- | src/views/mapplicationmenuview.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/views/mapplicationmenuview.cpp b/src/views/mapplicationmenuview.cpp index 8a3c3a74..750ead0d 100644 --- a/src/views/mapplicationmenuview.cpp +++ b/src/views/mapplicationmenuview.cpp @@ -414,10 +414,11 @@ void MApplicationMenuViewPrivate::changeData(QAction *action) MWidget *widget = buttons.value(action); MButton *button = qobject_cast<MButton *>(widget); + if (widget) + widget->setEnabled(action->isEnabled()); if (button) { // Update button data accordingly button->setText(action->text()); - button->setEnabled(action->isEnabled()); button->setCheckable(action->isCheckable()); button->setChecked(action->isChecked()); MAction *mAction = qobject_cast<MAction *>(action); |