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

Selected Tree Node Is Not Visible On Start-Up #1704

Closed
gh9000 opened this issue May 27, 2021 · 2 comments
Closed

Selected Tree Node Is Not Visible On Start-Up #1704

gh9000 opened this issue May 27, 2021 · 2 comments

Comments

@gh9000
Copy link
Contributor

gh9000 commented May 27, 2021

Version, Operative system
0.99.37, Linux: Arch Linux, Desktop Environment = Cinnamon 4.8.6-1

Describe the bug
When the Cherrytree preference, “Miscellaneous -> System Tray -> Start Minimized in the System Tray", is enabled, the selected Tree Node does not appear in the visible area of the TreeView Panel. Scrolling is required to bring the selected Node into view. This only occurs on Cherrytree startup. Also (and obviously), this behavior only occurs if the selected Tree Node is further down in the TreeView Panel than the height of the Panel, i.e., if the panel can show 50 Nodes based on the height of the panel, and any Node between 1 and 50 was selected, no scrolling would be required. However, any selected Node from 51 and down will be invisible until you scroll to find it.

Here are a few more observations about this issue:

  • With the original code, when preference, “Miscellaneous -> System Tray -> Start Minimized in the System Tray", is disabled, it appears that the code (the 'present()' function @ line 150 in src/ct_main_win.cc) positions the selected Node at the top border of the TreeView panel.
  • With the original code, when preference, “Miscellaneous -> System Tray -> Start Minimized in the System Tray", is enabled, it appears that the code (the ‘set_visible(false)’ function @ line 147 in src/ct_main_win.cc ) causes Cherrytree to open with the first Node at the top border of the TreeView panel, but selects the correct Node. The problem is that the selected Node is more likely-than-not to be scrolled out-of-view.
  • With the modified code, when preference, “Miscellaneous -> System Tray -> Start Minimized in the System Tray", is disabled, behavior is the same as with the original code.
  • With the modified code, when preference, “Miscellaneous -> System Tray -> Start Minimized in the System Tray", is enabled, it appears that the code ( ‘present(); set_visible(false)’ ) causes Cherrytree to open with the selected Node approximately in the middle of the TreeView panel, but always visible, nevertheless.

Keep in mind that while I did not notice any unexpected side-effects during limited use of Cherrytree with the patch applied, the developer(s) may recognize potential issues without even applying them.

Finally, it seems very strange to me that I have experienced this behavior in my normal Linux install and in a fresh install of Arch in VirtualBox, and that the issues have not been reported by anyone else. I have a feeling I missed a previous bug report, or something really odd is going on with my particular set-ups. The bugs have been present in all the 0.99 versions I've had installed, but I kept with 0.39 for several months after 0.99 was released (0.99.32 was the first 0.99 version I installed).

To Reproduce
Steps to reproduce the behavior:

  1. Add Cherrytree to your system's startup applications.
  2. Set Cherrytree preference: “Miscellaneous -> System Tray -> "Start Minimized in the System Tray" to 'enabled'.
  3. Restart system.
  4. Click on the Cherrytree Status Icon to open it. If you previously exited Cherrytree with a node selected that was deep in the hierarchy, it will not be visible in the Tree Panel, and you will have to scroll to find it.

Attachment
The attached 'patch' file addresses the described issue.

cherrytree-0.99.37_treenodevisibility.patch.txt

Thank you.

@giuspen
Copy link
Owner

giuspen commented May 29, 2021

Could you make a pull request?

giuspen pushed a commit that referenced this issue May 30, 2021
…ility #1704 (#1707)

* bugfix - status icon (missing / bad render) and critical gtk error:
[gtk] [critical] gdk_window_thaw_toplevel_updates: assertion 'window->
update_and_descendants_freeze_count > 0' failed

* Bugfix - selected node is not visible in TreeView panel on startup when
preference 'Misc. -> System Tray -> Start Minimized in the System Tray'
is enabled. This commit makes the selected node visible.
@giuspen
Copy link
Owner

giuspen commented Jun 11, 2021

fixed in 0.99.38

@giuspen giuspen closed this as completed Jun 11, 2021
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

No branches or pull requests

2 participants