Added functionalisty to the add panel button.