gui-cs / TerminalGuiDesigner

Forms Designer for Terminal.Gui (aka gui.cs)
MIT License
426 stars 28 forks source link

Fixes #230. Why using menuOpen and not ContextMenu.IsShow in the Editor? #231

Closed BDisp closed 1 year ago

tznind commented 1 year ago

This code works, why change it?

I don't see how going from a private variable and instance event (MenuAllClosed) to a static variable is an improvement.

This feels like it could be a problem because the context menu lanuches sub screens and down the road they might have context menu's of their own.

BDisp commented 1 year ago

This code works, why change it?

It's working.

I don't see how going from a private variable and instance event (MenuAllClosed) to a static variable is an improvement.

I only though if you haven't knowing about it, wasn't an improvement, of course.

This feels like it could be a problem because the context menu lanuches sub screens and down the road they might have context menu's of their own.

Well, ContextMenu can have sub-menus and still have control of his state. But that why I created this issue as a question, waiting for an answer if it has a reason to be like this. But I understand that not important and I close this issue.

tznind commented 1 year ago

Cool, sorry I didn't realise it was just a discussion.

The code was part of locking selection and general state management that I introduced when I had issues with the selected collection of controls changing or other stuff happening while sub-screens were up having been launched from context menu. Probably as a result of the global keyboard/mouse handlers I use. I've not touched that bit in a while so think its best to take a 'if it isn't broke - dont fix it' approach to v1 and focus effort on v2 where possible.

Thanks for your work bringing things together with the new nuget packages its really helpful as I have less time at the moment. ❤️