On 26/04/2018 at 03:51, xxxxxxxx wrote:
Do you still experience the crash? If yes, please share your code. Without knowing in which context, you are running is very difficult for us to be able to help you.
About the undo I'm not sure to understand if the fact that all objects disappear is something you want or not. Please confirm.
If it's not the expected behavior please share your code.
Since I'm not really sure about what you want to achieve, I prefer to ask and give you some clues, but of course please confirm and tell us what is the expected behavior, and what you currently have (with a piece of code), in order to solve your issues as soon as possible ;)
And finally your last question regarding closing when CTRL+Z is pressed is a bit weird in a c4d workflow/design decision and I don't see any other GUI in C4D which quit when you undo an action in the scene.
With that said, if you really want to close your GeDialog no matter the active window.
You have to register a SceneHook and react to KeyboardInput(). Then send a CoreMessage to your GeDialog, finally catch this message in your GeDialog and close it using Close().
In the same time make sure to not only test for CTRL+Z even if it can look weird, maybe some users have replaced undo shortcut by something else.