Add patch from Mario Luzeiro to 3D viewer. Fix a serious issue due to duplicate ID used in menus and toolbars between sub-applications, related to wxUpdateUIEvent events loop.
wxUpdateUIEvent events can be sent to parent frames, when opening a menu in a child frame, if parent and child frame share same ID fro menuitems (or tools)
The wrong menuitem can be used in some cases ( because there are more than one menuitem with the same identifier), by a wxUpdateUIEvent event function run in a parent frame.
3d-viewer: Fix some issues and clean code.
All:  Fix an issue due to duplicate ID used in menus and toolbars between a frame and its parents, related to wxUpdateUIEvent events loop.
wxUpdateUIEvent events are be sent to parent frames, when opening a menu in a child frame, if a child frame and its parents share same ID for menuitems (or tools)
The wrong menuitem can be used in some cases ( because there are more than one menuitem with the same identifier), by a wxUpdateUIEvent event function executed in a parent frame.
3D viewer: Add patch from Mario Luzeiro, fix some issues, and clean code.