Skip to content

UnregisterMenu & Readding Menus #71

@kiwidoggie

Description

@kiwidoggie

Hello, currently I am looking for a "UnregisterMenu" I make sure that I unregister all command before hand, but I have added this to CommandServiceBase (and the Interface as well)

        public virtual void UnregisterMenu(object menuTag, ICommandClient client)
        {
            MenuInfo info = GetMenuInfo(menuTag);
            if (info == null)
                return;

            UnregisterMenuInfo(info, client);
        }

        protected virtual void UnregisterMenuInfo(MenuInfo info, ICommandClient client)
        {
            info.Commands = 0;
            m_menus.Remove(info);
        }

Which seems to remove the menu properly, but for some reason when re-registering the menu it never shows up. I have no idea what I am missing and was hoping someone could enlighten me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions