Last year I got two pubic rami stress fractures that took me out for 8 months. I could swim after two, but no bike or run for 8. It was a nightmare.
I gained about 8lbs, but I didn't really watch my diet as much as I could've because...I'm human. Cutting calories by eating smaller portions worked best. I cut carbs a bit, but as long as I wasn't eating tons of bread, it was ok. I shouldve cut booze, but an 8 month layoff would drive anyone to drink, so I just tried to take it easy on the beer.
Use a pull bouy in the pool so you don't aggravate your hip flexors.
And pilates was key for getting me ready to get back on the road, so I second/third/fourth/fifth that suggestion.
Ask your PT to tape the hip flexor for you with KT tape, and that will help support it when you're walking.
Just be patient and remember that weight can be lost again. I know its hard, but its not worth reinjuring yourself.
'You can't always get what you want. But if you try sometimes, you'll find you get what you need.' - Mick & Keith