Cherry Picking (lyn1751) (#1854)
* Cherry Picking (lyn1751) Problem with DCO so we need to cherry pick this branch. Signed-off-by: aaguilea <aaguilea@amazon.com> * Cherry picking #2 Signed-off-by: aaguilea <aaguilea@amazon.com> * Cherry picking 3 Signed-off-by: aaguilea <aaguilea@amazon.com> * Changed variables reverseurls This was just changing some name variables. Signed-off-by: aaguilea <aaguilea@amazon.com> * Changes from past PR Signed-off-by: aaguilea <aaguilea@amazon.com> * changes from past PR and fixed small bug: Also removed some legacy code from Resources.h Signed-off-by: aaguilea <aaguilea@amazon.com> * couple of changes from actual PR Signed-off-by: aaguilea <aaguilea@amazon.com> * fixed copyright issues for AR Signed-off-by: aaguilea <aaguilea@amazon.com>
This commit is contained in:
committed by
GitHub
parent
a3d14e217e
commit
4f523e496f
@@ -385,6 +385,13 @@ void ActionManager::AddAction(int id, QAction* action)
|
||||
AddAction(action);
|
||||
}
|
||||
|
||||
void ActionManager::AddAction(AZ::Crc32 id, QAction* action)
|
||||
{
|
||||
action->setData(aznumeric_cast<AZ::u32>(id));
|
||||
AddAction(action);
|
||||
}
|
||||
|
||||
|
||||
void ActionManager::AddAction(QAction* action)
|
||||
{
|
||||
const int id = action->data().toInt();
|
||||
@@ -434,6 +441,15 @@ ActionManager::ActionWrapper ActionManager::AddAction(int id, const QString& nam
|
||||
return ActionWrapper(action, this);
|
||||
}
|
||||
|
||||
ActionManager::ActionWrapper ActionManager::AddAction(AZ::Crc32 id, const QString& name)
|
||||
{
|
||||
QAction* action = ActionIsWidget(aznumeric_cast<AZ::u32>(id))
|
||||
? new WidgetAction(aznumeric_cast<AZ::u32>(id), m_mainWindow, name, this)
|
||||
: static_cast<QAction*>(new PatchedAction(name, this)); // static cast to base so ternary compile
|
||||
AddAction(id, action);
|
||||
return ActionWrapper(action, this);
|
||||
}
|
||||
|
||||
bool ActionManager::HasAction(QAction* action) const
|
||||
{
|
||||
return action && HasAction(action->data().toInt());
|
||||
@@ -601,6 +617,11 @@ void ActionManager::AddActionViaBus(int id, QAction* action)
|
||||
AddAction(id, action);
|
||||
}
|
||||
|
||||
void ActionManager::AddActionViaBusCrc(AZ::Crc32 id, QAction* action)
|
||||
{
|
||||
AddAction(id, action);
|
||||
}
|
||||
|
||||
void ActionManager::RemoveActionViaBus(QAction* action)
|
||||
{
|
||||
RemoveAction(action);
|
||||
|
||||
Reference in New Issue
Block a user