Run these commands in your console, they will edit necessary files:
echo 'basename "$VIRTUAL_ENV" > ~/.last_venv' >> $VIRTUALENVWRAPPER_HOOK_DIR/postactivate
echo 'rm ~/.last_venv' >> $VIRTUALENVWRAPPER_HOOK_DIR/postdeactivate
touch ~/.last_venv
Then open your ~/.bashrc
or ~/.profile
or whatever your shell uses and append:
if [ -e ~/.last_venv ]; then
workon `cat ~/.last_venv`
fi