because of the Pterodactyl's existence and that bird was apart of the dinosaur era so they had to be related in some way. Recently scientists found a bird that was similar to the pterodactyl so yes birds have dinosaur ancestors. But scientifically birds did not evolve from Pterodactyls because that animal race did not have feathers. They evolved from a group of dinosaurs.
Hope this helps