When use "Close" Button and FlipFlop

When i use flip flop that will show and close widget , but i add a close button in widget , when i close the widget (i use set visibility hidden) , and use boolean , that cant show normally
this is press keyboard event

this is widget

Hi there! The main purpose is code duplication. As you can see your nodes with Remove from Parent exist in two places. When you refactor nodes to have only one place that implements this logic, the problem will disappear. For example, you can make it like that:

  • Put all code after Key Event to public function called for example ToggleSaveWidget
  • Call this function after Key Event and nothing more
  • Call this function after Click Event and nothing more

That’s all - your FlipFlop should work after that.

wow! prefect!! nice i love u ! i no need to use flip flop i use branch!

https://i.imgur.com/tpntamy.png

https://i.imgur.com/YhgnUAV.png

https://i.imgur.com/akhXwDz.png

https://i.imgur.com/Vku779s.png