CustomTreeControl Escaping edit node label causes inconsistent state on Linux

@Andrea_Gavana In our RIDE project, we have a CustomTreeControl with inplace node label edit control (by double-clicking or with F2 key). There is an assertion error in Linux systems, when we press the Escape key to cancel edition of the label. After this error, the editing function is broken and no longer possible to edit nodes labels (original Issue reported a crash).

I found a workaround to ignore the assertion error at the object Destroy call, which you can see here.

Would this be an acceptable fix? Or, should we condition the Destroy call on the existence of the object, or removing the assertion at Destroy and returning silently?

Hello @Helio_Guilherme,

I believe the is already a large and well structured PR that fixes this issue - and many more - in the wxPython GitHub page:

I am not sure why the PR has not been merged. Maybe @swt2c can comment on it? It contains very many fixes plus large speed up in rendering, so I’d argue it should be applied if possible.

Andrea.

Great!
Looking forward for the merge/release.

It has not been applied because it needs to be reviewed.

We have integrated those changes in our flagship application, pretty much as they are.

Maybe if @Helio_Guilherme is willing to test the PR, that would be considered as a good enough review?

I refactored/merged this files, and did minimal testing with their included demos.
Also my RIDE app worked OK.

This is the Pull Request
It would be nice if the original author could review it.