update viewer after copy/paste
Roll back to avoid conflict.
Code cleanup.
Clean up code.
Do not override the rnd settings.
Merge pull request #1992 from jburel/paste-rnd-openedviewer

update viewer after copy/paste