Added set shortcut to group command's Setup function

Implemented set shortcut in the group command's Setup function.
This change allows the group command icon to display the tool's shortcut,
but the shortcut appears only after the tool is selected once.
This commit is contained in:
Joona
2025-01-26 15:45:14 +02:00
parent d18a48ddb1
commit 268f672d90

View File

@@ -1121,6 +1121,8 @@ void GroupCommand::setup(Action *pcAction) {
int idx = pcAction->property("defaultAction").toInt();
if(idx>=0 && idx<(int)cmds.size() && cmds[idx].first) {
auto cmd = cmds[idx].first;
QString shortcut = cmd->getShortcut();
pcAction->setShortcut(shortcut);
pcAction->setText(QCoreApplication::translate(className(), getMenuText()));
QIcon icon;
if (auto childAction = cmd->getAction())