I have to confess that I have occasionally asked someone that question - but only when they looked at least 7 months - if I have any hesitation I would never ask - and no-one has ever said no.
And apparently someone asked me just last week if I was pregnant. I was at that point quite preoccupied by a sick child and didn't realize at all until he apologized for asking a few days later! (His wife told him I just had bad posture -sadly this is true)
As for people who you know are "trying", I follow the same policy as with unemployed friends (formulated in the dark mid 90's when graduate unemployment, as now I presume, was high) i. e. Don't ask, wait to be told because the asking will only add to the hurt if the answer is negative whereas the telling (once they do have a job/ get pregnant) will be something they will be happy to tell you (when ready to).
We lived in Japan when first married and were constantly being asked if I was pregnant! I kind of surmised that people there didn't get married until they were wanting to have kids and wasn't too bothered by it, although I would have been if I actually was pregnant, and just not willing to tell people yet (I have waited the 11-12 weeks in all my pregnancies, only excepting family and possibly one or two friends. It took me a while to get over the shock, even though they were wanted and even on the third).
BTW while I wasn't hurt by people in Japan asking about pregnancy, I was a bit hurt when I had lost weight and they said I was "fat" before! (No more than 2 pounds more than my current weight). I guess it was their limited English, but still.
What I have found embarrassing, is when Person A makes an assumption that Person B is pregnant, and tells me that they are,and I then congratulate Person A, and am wrong. Only happened once, but made me doubly cautious.
Also embarrassing when one's 4 year old offspring (just after I had a baby) asked another lady if she had a baby in her tummy!
Patience, I have been in that situation too and I will be interested in reading people's responses. One thing that does occur to me is based on how I felt about my father's death 4 years ago namely; I almost didn't want people to bring it up _unless_ we had time right now to talk about about it at some length.
If it was a situation when the conversation (for time reasons) would have had to be terminated in a couple more sentences or minutes, I would have rather they didn't say anything.
Sarah, You look fab, and I am sorry that person made you feel down