diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2014-03-16 09:36:04 -0500 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2014-03-16 09:36:04 -0500 |
commit | 0b31bc94b323801b4995fd32b20d5dc9463a0255 (patch) | |
tree | ac577275904c91939f7424902b03794e04480a4b | |
parent | 94aac0751db1c9d07d40d8c9303a0a287d69cd79 (diff) | |
download | qmenumodel-0b31bc94b323801b4995fd32b20d5dc9463a0255.tar.gz qmenumodel-0b31bc94b323801b4995fd32b20d5dc9463a0255.tar.bz2 qmenumodel-0b31bc94b323801b4995fd32b20d5dc9463a0255.zip |
when an action's model changes in UnityMenuAction::setModel(), make sure the action unregisters itself from the previous model.
-rw-r--r-- | libqmenumodel/src/unitymenuaction.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libqmenumodel/src/unitymenuaction.cpp b/libqmenumodel/src/unitymenuaction.cpp index 46edf16..6f564d1 100644 --- a/libqmenumodel/src/unitymenuaction.cpp +++ b/libqmenumodel/src/unitymenuaction.cpp @@ -59,9 +59,7 @@ UnityMenuModel* UnityMenuAction::model() const void UnityMenuAction::setModel(UnityMenuModel* model) { if (m_model != model) { - if (!model) { - unregisterAction(); - } + unregisterAction(); m_model = model; registerAction(); Q_EMIT modelChanged(model); |