Fixed multiple sort entry in undo popup

Multiple sort entries were appearing for one sort event after load
event. Fixed by checking if sort parameters have changed. Not the most
elegant fix but it works.