constants:
added coords_from_tileindex(...)
layer:
drawing new tiles on image change
edit_area:
call use_brush() only when the current img == layer.img