Added a test to see if the model has been selected.
Authored by: bugman 2008-08-12
Parent: [r7175]
Child: [r7177]