Your daughter is eating candy because the candy is available to her. If it's not available, she can't eat it.
This is a habit she has developed, and it's not an easy one to break. Be prepared to let her be hungry, and remember it's perfectly ok for her to eat nothing and to be hungry when you are making plenty of healthy food available to her. Good luck to you.