And when did the Supreme Court rule that the federal AWB on militia style weapons was constitutional?
They didn't. They let stand lower court rulings in the Navegar and Olympic Arms cases against the federal AWB.
A U.S. Supreme Court ruling is not necessary to make a law constitutional.