AppFwk: Always update userData of actions

This commit is contained in:
Rebecca Cox 2017-11-29 08:18:08 +01:00
parent 1d9d8f6794
commit d2e590875d

View File

@ -97,13 +97,14 @@ QAction* CmdFeature::actionWithUserData(const QString& customText, const QVarian
{ {
action = new QAction(this); action = new QAction(this);
connect(action, SIGNAL(triggered(bool)), SLOT(actionTriggered(bool)));
m_customTextToActionMap[customText]= action;
}
if (!userData.isNull()) if (!userData.isNull())
{ {
action->setData(userData); action->setData(userData);
} }
connect(action, SIGNAL(triggered(bool)), SLOT(actionTriggered(bool)));
m_customTextToActionMap[customText]= action;
}
this->setupActionLook(action); this->setupActionLook(action);
if (!customText.isEmpty()) if (!customText.isEmpty())