Minor code change according to suggestions
This commit is contained in:
@@ -311,26 +311,6 @@ void Workbench::setupCustomToolbars(ToolBarItem* root, const Base::Reference<Par
|
||||
void Workbench::setupCustomShortcuts() const
|
||||
{
|
||||
// Now managed by ShortcutManager
|
||||
#if 0
|
||||
// Assigns user defined accelerators
|
||||
ParameterGrp::handle hGrp = WindowParameter::getDefaultParameter();
|
||||
if (hGrp->HasGroup("Shortcut")) {
|
||||
hGrp = hGrp->GetGroup("Shortcut");
|
||||
// Get all user defined shortcuts
|
||||
const CommandManager& cCmdMgr = Application::Instance->commandManager();
|
||||
std::vector<std::pair<std::string,std::string> > items = hGrp->GetASCIIMap();
|
||||
for (const auto & item : items) {
|
||||
Command* cmd = cCmdMgr.getCommandByName(item.first.c_str());
|
||||
if (cmd && cmd->getAction()) {
|
||||
// may be UTF-8 encoded
|
||||
QString str = QString::fromUtf8(item.second.c_str());
|
||||
QKeySequence shortcut = str;
|
||||
cmd->getAction()->setShortcut(shortcut.toString(QKeySequence::NativeText));
|
||||
cmd->recreateTooltip(item.first.c_str(), cmd->getAction()); // The tooltip has the shortcut in it...
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void Workbench::setupContextMenu(const char* recipient,MenuItem* item) const
|
||||
|
||||
Reference in New Issue
Block a user