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:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user