Skip to content

Update treenodehandlers.py to prevent freeze ups - #2205

Merged
HelioGuilherme66 merged 1 commit into
robotframework:masterfrom
cbeytas:master
Jul 16, 2020
Merged

HelioGuilherme66 merged 1 commit into
robotframework:masterfrom
cbeytas:master

Conversation

@cbeytas

@cbeytas cbeytas commented Jun 10, 2020

Copy link
Copy Markdown
Contributor

The _ActionHandler class is based off wx.Window which causes a native widget to be created. Avoid adding this native window to the tree to prevent Windows OS freezes when the tree is scrolled. Add it to the tree's parent instead.
Looks like the only wx.Window feature utilized is for popup menus when a tree item is right-clicked.
Attempts to fix #1843.

The _ActionHandler class is based off wx.Window which causes a native widget to be created. Avoid adding this native window to the tree to prevent Windows OS freezes when the tree is scrolled. Add it to the tree's parent instead.
Looks like the only wx.Window feature utilized is for popup menus when a tree item is right-clicked.
Attempts to fix robotframework#1843.
@HelioGuilherme66
HelioGuilherme66 self-requested a review June 10, 2020 10:49

@HelioGuilherme66 HelioGuilherme66 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although the change looks harmless, there is a situation where the right-click menu and tests content becomes unusable. If you start RIDE with Tree hidden/closed, and open a test suite folder, then when restored the Tree, right-clicking does not show the menu, and expanding test suites does not show test cases. Because it breaks this function, this PR cannot be merged.

@HelioGuilherme66

HelioGuilherme66 commented Jun 10, 2020 •

Copy link
Copy Markdown
Member

Thank you @cbeytas for the PR. In the future, please create a branch for the modifications and PR, it helps organizing code merging and history of changes. You can do this very easily after updating master (git pull upstream master), with a git checkout -b fix_1843 (in this case).

@Nyral

Nyral commented Jun 19, 2020 •

Copy link
Copy Markdown
Contributor

If you start RIDE with Tree hidden/closed, and open a test suite folder, then when restored the Tree, right-clicking does not show the menu, and expanding test suites does not show test cases.
@HelioGuilherme66

Based on my observations, this occurs only when RIDE starts with Tree floating or it was floating previously and it was hidden afterwards. Can you confirm?

If that's the case, then one simple solution would be to force RIDE to always start with the Tree docked.

@cbeytas
The changes proposed cause all widgets to be moved to the frame holding the Tree. But if Tree is already floating then they are moved to the AuiFloatingFrame, not RideFrame. As such, when the AuiFloatingFrame is closed the widgets are lost. You can see this by using debugconsole.

@HelioGuilherme66

Copy link
Copy Markdown
Member

Based on my observations, this occurs only when RIDE starts with Tree floating or it was floating previously and it was hidden afterwards. Can you confirm?

This is a problem of Tree panel, the implementation is not the best because the tree is only created at init time. The update tree is not working well. I would not like to go back to the static position of tree panel. Best is to fix the tree update and refresh (messaging trigger).

@HelioGuilherme66

Copy link
Copy Markdown
Member

Thank you for the PR, I am going to merge because at least removed GTK error messages.

@HelioGuilherme66 HelioGuilherme66 added the enhancement Request for improvement: either for an existing feature or a new one label Jul 16, 2020
@HelioGuilherme66 HelioGuilherme66 added this to the v2.0 milestone Jul 16, 2020
@HelioGuilherme66
HelioGuilherme66 merged commit 970d2a4 into robotframework:master Jul 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Request for improvement: either for an existing feature or a new one

Projects

None yet

Development

Successfully merging this pull request may close these issues.

System freezes on Windows 10

3 participants