Was leaving the father of my child a good idea?

So my baby daddy cheated on me before we found out I was pregnant and he would still contact his ex even after he found out I was pregnant so I had to put my foot down and tell him that I wasn't comfortable with him having any kind of communication with her to cut it off now. He did but recently I went to a rave and it was my last one for the year. We both went and all our friends, well his ex is there and my two close friends who are both guys then tell me the next day in the morning that he called his ex and that she left and who knows what they did. Plus when we were at the festival he would go hangout with her group of friends knowing she'd be with them. He uses the excuse of his being "too fucked up" but I'm just over the excuses and I just feel like I deserve better. Also he never posts me on social media and he still has pictures with her on his profile which bothers me but he's so quick to post that he's single yet he will not post anything about me. When I did talk to him about this he would get mad and offended because he doesn't like that I "can't trust him" but he forgets to realize he messed that up. Plus He said "i thought it would be alright as long as I didn't talk to her"? Which makes no sense to me because to me that's just disrespectful. He doesn't feel like he did anything wrong but it bothers me that he didn't hang out with me the whole time there but after he wanted to he all over me? Am I overreacting or do y'all think me leaving him was a good idea?