Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing a menu from MenuBar causes an Exception #292

Closed
AlexOdyn opened this issue Jul 27, 2018 · 1 comment
Closed

Removing a menu from MenuBar causes an Exception #292

AlexOdyn opened this issue Jul 27, 2018 · 1 comment
Labels

Comments

@AlexOdyn
Copy link

  • VisUI version 1.4.1-SNAPSHOT
  • Libgdx version 1.9.8

The addMenu() method of MenuBar sets the menuBar of the menu:
menu.setMenuBar(this);

The removeMenu() method tries to set the menuBar of a menu to null:
menu.setMenuBar(null);

The menu checks in the seMenuBar() method that the menu has already been set before and throws an exception:
if (this.menuBar != null) throw new IllegalStateException("Menu was already added to MenuBar");

Am I removing/adding the menu incorrectly or is this just an oversight?

@kotcrab
Copy link
Owner

kotcrab commented Jul 28, 2018

Definitely oversight, fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants