As far as I know, the order is determined from the order it is added. Unlike siblings, relationship dates have no bearing on the order of the relationships, and neither do the children from those relationship's birth dates.
Here is some solutions which I answered another question with here: http://answers.familyecho.com/9316/person-several-marriages-entered-chronological-order-changed
I actually came across this issue before and I did send feedback about adding this feature some time ago, but in the meantime I came up with two solutions, but they have some setbacks.
You can delete the current relationships, add their exes, then re-add the current ones again. But if they have descendants together then that isn't possible without deleting everyone, too.
The other way is to change this in the import files. For FamilyScript files (didn't check with GEDCOM), you have to move the current partnership, the p lines, before the line with the partnership with the ex, though you would have to reimport the tree to do that and of course, pictures wouldn't be retained. Also, you might need a bit of knowledge about the file format to be able to identify the right people (basically checking if they have the same IDs).