Personally, I think you handled the situation exactly right - keep your mouth shut about your gun until such time as the officer is going to more likely than not find it anyway. I've been asked to exit the vehicle once while open carrying, but the officer never gave me a chance to tell him about my gun before he walked back to between our vehicles where we met. Since I could not legally leave my gun in the car, I simply got out and walked back to meet him. Not a word was said by either one of us about my openly carried Taurus PT-145.
Good for you, sounds like you gave the officer something real to think about.