Skip to content

Fix hiding/showing items with submenus on Windows#204

Merged
Crosse merged 1 commit intogetlantern:masterfrom
simonlindholm:fix-submenu-hide-show
Feb 22, 2022
Merged

Fix hiding/showing items with submenus on Windows#204
Crosse merged 1 commit intogetlantern:masterfrom
simonlindholm:fix-submenu-hide-show

Conversation

@simonlindholm
Copy link
Contributor

Calling Hide() on a menu item with a submenu would call DeleteMenu, which deletes both the item and the submenu. The submenu would then get lost when calling Show() again.

Switch to RemoveMenu, which only deletes the item, preserving the menu for Show() to resurrect.

(This already works as expected on Linux, haven't been able to test macOS.)

@myleshorton
Copy link
Contributor

Thanks @simonlindholm just wanted to acknowledge these and to thank you and to let you know we'll get to them!

@myleshorton
Copy link
Contributor

@en0ma I wonder if you could possibly take a look at these PRs?

@davidnewhall
Copy link

+1 - The existing behavior also produces a panic if you call Hide() on the parent menu then call Hide() on the sub menu later. (That's what brought me here.)

@Crosse Crosse merged commit e849b2a into getlantern:master Feb 22, 2022
@simonlindholm simonlindholm deleted the fix-submenu-hide-show branch February 22, 2022 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants