Add a toggle action with an appropriate accelerator key, and connect it to the menu and the toolbar to switch between displaying the loaded image in the canvas and not displaying a generated image.
The idea is that, if an image has been loaded, then this action becomes enabled. Then triggering it, by clicking on the button, will disable drawing the image on the canvas and instead not draw anything else in its place. In a later task this will be changed to generating and drawing a different image.
If the action is triggered again, it goes back to displaying the loaded image (the image does not need to be reloaded, merely redrawn)
Care should be taken to only have the toggle action enabled when an image is loaded.