Function for blocking signals from slice navigation controller

Note that I also corrected a little mistake in the code:
I removed line 329 and 336 because they were in conflict with line 221 and 351.