1697 loss of red line

This should solve bug 1697 and 1698.

I started to refactor medViewContainer a little bit by renaming some methods and variables but some refactoring is probably still required.

This piece of code is a bit tricky so when testing, don't forget to use drag/drop and double-clic to set images and to test different containers (single, multi, custom) and workspaces.

Thx
Guillaume