- changed status to resolved
View->Show/Hide Trees option/behavior unexpected after manual show/hide
I noted that if you manually show/hide a tree or both trees, the option in the view menu doesn't seem to keep up, nor does the operation do what you would expect if it was displaying correctly. If both trees have been manually shown, the View menu option still says "Show Trees". Or if they're been manually hidden, the view menu still says "Hide Trees". Additionally, if you have the left tree hidden & the top one shown, the menu option works on just the top tree.
I think that if one tree is shown and the other hidden, what the menu option is doesn't matter so much, just as long as it operates on the tree whose visibility is the opposite of what the menu option says.
I had a screen shot, but my connection to work has become to unstable to be usable.
Comments (10)
-
repo owner -
reporter Still not working for me on the master branch. If I hide the top tree manually, the view menu has a "Show trees" option, which is fine, but when you select it, it hides the tree on the left. I took a screen recording of the behavior:
https://bitbucket.org/TreeView3Dev/treeview3/downloads/showhidetrees.mov
-
reporter - changed status to open
Chris & I cleared up the intended behavior:
Case 1:
-
Select "View->Show Trees" when both trees are hidden
-
Both trees are shown & menu option toggles to hide
Case 2:
-
Select "View->Show Trees" when left tree is hidden & top tree is visible
-
Left tree is shown (& top tree remains visible) & menu option toggles to hide
Case 3:
-
Select "View->Show Trees" when left tree is visible & top tree is hidden
-
Top tree is shown (& top left remains visible) & menu option toggles to hide
Case 4:
-
Select "View->Show Trees" when both trees are visible (i.e. the menu status is not up to date)
-
Tree visibility does not change & menu option toggles to hide
Case 5:
-
Select "View->Hide Trees" when both trees are hidden (i.e. the menu status is not up to date)
-
Tree visibility does not change & menu option toggles to show
Case 6:
-
Select "View-> Hide Trees" when left tree is hidden & top tree is visible
-
Top tree is hidden (& left tree remains hidden) & menu option toggles to show
Case 7:
-
Select "View-> Hide Trees" when left tree is visible & top tree is hidden
-
Left tree is hidden (& top tree remains hidden) & menu option toggles to show
Case 8:
-
Select "View-> Hide Trees" when both trees are visible
-
Both trees are hidden & menu option toggles to show
-
repo owner If we have a toggling menu button, then I can only do either case 2&3 or case 6&7. The button can only have one state at a time (Show vs. Hide). I implemented the functionality of case 2&3 now.
We can also only implement one of the two for toggling. When I press CMD + T to toggle the trees while the row trees are shown and the column trees are hidden, should row trees hide so that both are hidden or should column tree show so that both are shown?
-
reporter I'm not sure I understand why you can have either 2&3 or 6&7, but not both together. The menu either displays an option to show (cases 2&3) or hide (cases 6&7) the trees.
Cases 2&3: If 1 tree is currently visible and show is selected, the result should be both are visible and the menu option changes to now display the phrase "hide trees".
Cases 6&7: If 1 tree is currently visible and hide is selected, the result should be both are hidden and the menu option changes to now display the phrase "show trees".
-
repo owner I understood what was supposed to happen. But you want to be able to make a choice between show and hide when only one tree is visible. That would require two menu items instead of one. I was just wondering if that's how it should be implemented.
-
reporter I don't think it should require 2 menu items, though you're more familiar with the code than I am. But without respect to what currently exists in the code, all that's needed is to know what state the menu item is in (whether it's displaying show or hide). If it's "show", then all trees should be shown when it's selected. If it's hide, then all trees should be hidden. - regardless of how many trees are shown/hidden. And the menu option should always toggle to the opposite state. Does that make sense?
I know that ⌘-t toggles as well. I think that ideally it would control what the menu item is displaying and the two methods would be in sync.
-
repo owner This is actually what is implemented right now. Looks like I misread what you previously wrote since I totally agree that this is how it should work. Sorry about the misunderstanding. I believe this is exactly what it is doing now. Issue
#147will cause both trees to be shown on resize and therefore the menu button also adapts -- even if it's only a few pixels. -
reporter - changed status to resolved
Aha, I see it's fixed. Sorry, I didn't check to see if it was resolved. Looks to be working.
-
- changed status to closed
- Log in to comment
attempt to fix
#152; added property change listener that should update the JMenuItem when the divider hits position 0→ <<cset a72b8aa16bb5>>