darktable-org/darktable — pull request #710 by pedrocr (2014-10-22 12:20:53+00:00)
Title: reload_defaults before gui_update/gui_init when changing images

This fixes the colorin bug for me (no more warning) and seems to be quite stable. I'm not sure about the second change in the diff though as it only happens on multiple instance modules. It does seem like we should always do reload_defaults before gui_update/gui_init so it looks right. The order of events is now:

```
# Open a D1x NEF in darkroom
3 Running reload_defaults for colorin
3 Running gui_init for colorin
3 Running reload_defaults for colorin
3 Running gui_update for colorin
3 Running gui_update for colorin

# Press space to move to the next image
4 Running reload_defaults for colorin
4 Running gui_update for colorin
4 Running reload_defaults for colorin
4 Running gui_update for colorin
3 Running reload_defaults for colorin
4 Running gui_update for colorin

# Press backspace to move back
3 Running reload_defaults for colorin
3 Running gui_update for colorin
3 Running reload_defaults for colorin
3 Running gui_update for colorin
4 Running reload_defaults for colorin
3 Running gui_update for colorin
```

We're still doing a lot of extra calls of course. On export we still only do 1 reload_defaults call so that's still correct.