A TDO won't cause you to lose your gun rights unless, at the evaluation hearing, you voluntarily admitted yourself for treatment or were involuntarily commited. Unless they've changed things in the past few months. But even with a voluntary admission, the state police site still says, "may"
http://www.vsp.state.va.us/Firearms_...igibility.shtm
"A person who answers "yes" to any of the below questions
may be prohibited from purchasing or possessing a firearm pursuant to state and/or federal law. "
"13.Have you ever been the subject of a temporary detention order and subsequently agreed to voluntarily admission for mental health treatment? "