Yes, it would still hurt.
Pain from a fracture comes from inflammation and soft tissue damage around the fracture, not just mechanical loading of the fracture site. Periosteum (the membrane adherent to the surface of the bone and which forms the attachment point of muscles) is highly innervated. It may be ruptured when the bone is fractured, or it may dissected away from the bone by hemorrhage. Ouch.
Zero gravity might aid immobilization. A well immobilized fracture hurts less, but it still hurts. Don’t ask me how I know.
Acute inflammation hurts less with elevation, but not the orbital kind of elevation. Gravity can aid drainage and reduce swelling, which reduces pain in injured tissues. Zero-g means no gravity. I think I'd prefer to have my broken leg treated on the ground.