Women who gain weight after having a baby may be more likely to develop diabetes during their next pregnancy, a new study suggests.