Lock a background image from being easily deleted? The hide/show background image button is just a few pixels to the left of the delete background image button.



When I need to toggle hiding and showing the image (my eyes go off the hide/show button and watch the image alignment with my model), I sometimes hit the delete because my mouse will creep a few pixels to the right. Then I have to load, align, resize, move and rotate the image all over again every time this happens! 

Is there an image lock add on, feature or any workaround to stop or prevent this?
There is a way if you are willing to edit Python files in the Blender installation... Go to to the directory Blender/2.78/scripts/startup/bl_ui and edit the file space_view3d.py in a text editor (after you made a backup)

Search for the line

row.operator("view3d.background_image_remove", text="", emboss=False, icon='X').index = i


This is the code that adds the delete button. Add the following line in the front of it:

row.label(text="  ") 


This line adds an (invisible) text consisting of two spaces between the eye icon and the delete button. You can change the number of spaces as you like. Result:



And in the future when you upgrade your Blender version, repeat the procedure. Not very convenient, I know :)