Both of my grandfathers did the same thing. When they sat down, they would unbutton their coat, and button it back up again anytime they stood. Dad and my uncles did so when at other peoples houses, in meetings, or around strangers. And always if there was a lady present in the room.
I think it was just proper etiquette! Something we don't see much of today.