EditController: Properly update the edit state
This merge request brings a fix to the edit controller by:
- Properly updating the edit state after an edit action is performed.
- Properly handling the media groups special case, where the view can be discarded after being emptied. In which case, the edit update information needs to be propagated.
Closes #1743 (closed)