Fix unbound var

This commit is contained in:
Isaiah Odhner 2023-09-21 16:30:37 -04:00
parent 3cc4d9ff5d
commit 2b1b40fc12

View File

@ -215,12 +215,12 @@ class Canvas(Widget):
cell_y = y // magnification
try:
if sel and sel.contained_image and sel.region.contains(cell_x, cell_y) and (sel.mask is None or sel.mask[cell_y - sel.region.y][cell_x - sel.region.x]):
# bg = sel.contained_image.bg[cell_y - sel.region.y][cell_x - sel.region.x]
bg = sel.contained_image.bg[cell_y - sel.region.y][cell_x - sel.region.x]
# fg = sel.contained_image.fg[cell_y - sel.region.y][cell_x - sel.region.x]
ch = sel.contained_image.ch[cell_y - sel.region.y][cell_x - sel.region.x]
style = sel.contained_image.sc[cell_y - sel.region.y][cell_x - sel.region.x]
else:
# bg = self.image.bg[cell_y][cell_x]
bg = self.image.bg[cell_y][cell_x]
# fg = self.image.fg[cell_y][cell_x]
ch = self.image.ch[cell_y][cell_x]
style = self.image.sc[cell_y][cell_x]