Pedro II didn't wish to abdicate the throne, he felt he had to reign until he died, much like Elizabeth II today.
The impression I have is that was a consequence of his male heirs dying. If one of them survives, it's reasonable to assume things might be different(of course, that is based on my impression being right).