app: avoid inadvertent calls to image actions on file -> revert
When reverting, we load a new image into the old image's existing displays, and replace all references to the old image by the new image in all GimpContext instances. We used to first update the displays and then the contexts, which would shortly produce an inconsistent state where the contexts were out of sync. When updating the displays with the new image, we sometimes call menu update functions which would then use that old image from the context when they should use the new one, and thus triggered callbacks as if the user had activated a menu (like image -> precision). To fix this, update the contexts before the displays. It is also more logical to first update model objects and then view objects.
Showing with 12 additions and 8 deletions