Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 69c16fa9 authored by Laurent Montel's avatar Laurent Montel 😁

Fix assign menu

parent 21dcc7e3
......@@ -517,10 +517,10 @@ TemplatesCommandMenu::MenuTypes TemplatesCommandMenu::type() const
void TemplatesCommandMenu::setType(MenuTypes type)
{
mType = type;
// delete mMenu;
// mWasInitialized = false;
// fillMenu();
// fillSubMenus();
delete mMenu;
mWasInitialized = false;
fillMenu();
fillSubMenus();
}
void TemplatesCommandMenu::slotInsertCommand(TemplatesCommandMenu::Command cmd)
......
......@@ -30,7 +30,6 @@ TemplatesInsertCommandAction::TemplatesInsertCommandAction(QObject *parent)
mMenuCommand->fillSubMenus();
mMenuCommand->setObjectName(QStringLiteral("templatescommandmenu"));
connect(mMenuCommand, QOverload<const QString &, int>::of(&TemplatesCommandMenu::insertCommand), this, &TemplatesInsertCommandAction::insertCommand);
setMenu(mMenuCommand->menu());
}
......@@ -47,4 +46,5 @@ TemplatesCommandMenu::MenuTypes TemplatesInsertCommandAction::type() const
void TemplatesInsertCommandAction::setType(TemplatesCommandMenu::MenuTypes type)
{
mMenuCommand->setType(type);
setMenu(mMenuCommand->menu());
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment