Removed duplicate code. Refs #3464."

Accidently forgot to remove code when refactoring.
Merge branch 'feature/3464_fix_cancel_button_when_plotting' into develop