sentence1: Some one stepped on it. He rose from his knees, and walked slowly across to the mantelpiece, where he stood abstractedly fingering the ornaments, and straightening them, a trick of his when he was agitated. 
sentence2: When agitated, the speaker likes to straighten things.