Is there some plugin that would reconnect query tabs to original DB's in SSMS? It's a minor thing, but annoying one.

I'm currently working on about 5 different databases, and every time I restore db's from snapshots or run my restore from backup scripts, all of the queries get disconnected.
Sure, I can just rerun them, but the db is set to 'master' by default (yes, writing use mydbx at the beginning of query is useful, but often forgotten, and I usually have two pages of various scripts in each).

Is there some plugin out there that would remember which query was on which db, and reconnect automatically from time to time?
You can set the default database for each login. If you subsequently drop this database you can run into chicken-and-egg problems trying to correct it, so be careful.