 If the children of Robert II by his first wife "were" legitimated by their parents' subsequent marriage (as later legal doctrine would have it), then the heir presumptive in 1437 was the King's eldest sister
However, if the children of Elizabeth Mure were "not" legitimate, then the heir whomsoever of Robert II during the period 1437 to 1451 was 
In the event this potential problem over the succession never arose, as Queen Mary gave birth to a son and heir apparent,
After fathering three more sons, King James II, an artillery enthusiast, was killed by an exploding cannon while besieging Roxburgh Castle, 3 October 1460, and was succeeded by his eldest son.James III was nine years old at his accession, and his heir-presumptive was his next brother
James III was killed in battle with the rebels at Sauchie Burn on 11 June 1488 and his son ascended the throne as James IV.At the accession of James IV his heir-presumptive was his next brother
James IV died the next year in battle at Flodden, 9 September 1513, and was succeeded as King by his only son (though another was born posthumously).