Show dialog before adding to table view.
Restore preferences window correctly using a hack.