I am trying to figure out how to toggle the presence of a Widget in the “main area” without having to create and destroy it each time. In the implementation here,
, I am using DocLayout#.addWidget and DocLayout#removeWidget in order to toggle its visibility. However, when I do this it does something that breaks the main area, as, for example, I cannot load the Advanced Settings Panel after I have toggled it on and off. As such, although it seems to work, I am sure I am doing something wrong.
Does anyone know what I am doing wrong, or can anyone direct me to a working example?