wx GUI: Don't autohide menu if no database is open (also fixes bug with F10)

Fixes #328