If I had sex with him, I'd leave. If I didn't, then I believe it would be fine. It would depend on how far the relationship went.
I don't really see an ex marrying your bestfriend as insulting. I see it as they finally found happiness. Good for them.