Fix segfault-causing bug.

When a rotation gate is selected and then deselected, the rotation
gate edit pane remains open. Changing any property in the pane at
this point causes the program to crash.

Fix: Hide the pane when no gates are selected.