Bug fix the database selection when opening existing query.

The list of database choices had no "selected" option, thus opening a
saved query or a chart would only work when it was saved against the
first database of the list of registered ones.