Skip to content

Comments

Bug fixes in chapter 13#22

Open
dgruntz wants to merge 3 commits intoeppleton:masterfrom
dgruntz:kap-13
Open

Bug fixes in chapter 13#22
dgruntz wants to merge 3 commits intoeppleton:masterfrom
dgruntz:kap-13

Conversation

@dgruntz
Copy link
Contributor

@dgruntz dgruntz commented Aug 15, 2018

Fixes the treeview expand/collapse arrow bug
This commit fixes the treeview expand/collapse arrow bug as described in
https://stackoverflow.com/questions/50011276/javafx-treeview-expand-collapse-disclosure-arrow-bug

It adds a style file (tree.css) which defines the rotation angle of the arrow for both the normal and the expanded case.

Removes doubled navigate menu
Removes

    menuBar.getMenus().add(navigateMenu);

as the menu is also added with the command

    menuBar.getMenus().addAll(navigateMenu, historyMenu);

It appeared twice.

Fixes the CME exception
When an entry is removed from list historyMenu.getItems() in the loop

   for (MenuItem i : historyMenu.getItems()) {
        if (i.getId().equals(e.getUrl())) {
            historyMenu.getItems().remove(i);
        }
   }

then a CME is thrown. Iterating over a copy fixes this problem. An alternative would be to leave the loop with a break, but this only works if the menu item i appears at most once in the list.

dgruntz added 3 commits August 5, 2018 12:21
This commit fixes the treeview expand/collapse arrow bug as described in
https://stackoverflow.com/questions/50011276/javafx-treeview-expand-collapse-disclosure-arrow-bug

It adds a style file (tree.css) which defines the rotation angle of the
arrow for both the normal and the expanded case.
Removes
        menuBar.getMenus().add(navigateMenu);
as the menu is also added with the command
        menuBar.getMenus().addAll(navigateMenu, historyMenu);

It appeared twice.
When an entry is removed from list historyMenu.getItems() in the loop
       for (MenuItem i : historyMenu.getItems()) {
            if (i.getId().equals(e.getUrl())) {
                historyMenu.getItems().remove(i);
            }
       }
then a CME is thrown. Iterating over a copy fixes this problem.
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.

1 participant