Why does my cat keep scratching people when they try to pet her?

My cat Sami keeps scratching people including myself when we try to pet her. She gets along perfectly fine with my dog (Penny raised Sami as her own when Sami was given away too early). I reach my hand out to [Sami] let her smell it, she seems fine, then I pet her and she smacks me! I don't understand this behavior and why she does it. She doesn't really show any signs that she doesn't like something or is annoyed except when she waves her tail really fast. Please help?
Asked May 02, 2015

TIP: If it's not your answer to this question, please click "Leave a Comment" button under the question to communicate with the question owner.