Skip to content

Commit

Permalink
Fix removing Menu causes exception, close #292
Browse files Browse the repository at this point in the history
  • Loading branch information
kotcrab committed Jul 28, 2018
1 parent 1c87f94 commit d24b0ce
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions ui/CHANGES.md
@@ -1,5 +1,6 @@
#### Version: 1.4.1 (LibGDX 1.9.8)
- **Fixed**: `FileChooser`'s icon provider not working correctly when chooser's selection checkboxes were enabled
- **Fixed**: [#292](https://github.com/kotcrab/vis-editor/issues/292) removing `Menu` from `MenuBar` causes `IllegalStateException`

#### Version: 1.4.0 (LibGDX 1.9.6)
- **Added**: [#259](https://github.com/kotcrab/vis-editor/issues/259) `VisImageTextButton#setGenerateDisabledImage(boolean)` along with getter, added `VisImageButton#isGenerateDisabledImage`
Expand Down
2 changes: 1 addition & 1 deletion ui/src/main/java/com/kotcrab/vis/ui/widget/Menu.java
Expand Up @@ -97,7 +97,7 @@ public boolean remove () {

/** Called by MenuBar when this menu is added to it */
void setMenuBar (MenuBar menuBar) {
if (this.menuBar != null) throw new IllegalStateException("Menu was already added to MenuBar");
if (this.menuBar != null && menuBar != null) throw new IllegalStateException("Menu was already added to MenuBar");
this.menuBar = menuBar;
}

Expand Down

0 comments on commit d24b0ce

Please sign in to comment.