Yes, she was cast on the basis of her stage performance of My Fair Lady. Then, when Fox were casting Sound of Music, they watched some early edits of Mary Poppins which at the time was unfinished so that they could see what she was like on screen (the powers that be needed to be persuaded apparently).