Actually, it goes a bit beyond the preceding two posts.
As noted, a "Terry stop" is allowed if/when an officer has a "reasonable suspicion" of criminal activity. As KyJim stated, the suspicion can't be a hunch, it must be founded in clearly articulable facts.
But, a Terry stop is still not an arrest based on probable cause. It is a preliminary, investigative stop. The officer involved is NOT allowed to conduct a full-scale search of the "subject." The officer is allowed to conduct a quick pat-down (a so-called "Terry frisk"), for the sole purpose of determining whether or not the subject is armed and thus might pose a significant threat to the officer's safety.
But in the case in point, the entire incident arose because an officer saw a gun. So there was no need for a frisk of any sort, because the officer already knew the subject was armed. The law specifically provides that concealed carry is not illegal if you have a permit. In fact, as I have stated multiple times, the law itself specifically says that it does not even apply if the subject has a permit.
Therefore, the officer had no legitimate basis, in light of Terry, to make even an investigatory stop. He had NO clearly articulable facts to suggest that a law was being broken.