mirror of
https://github.com/1j01/textual-paint.git
synced 2024-09-11 23:57:12 +03:00
Fix unbound var
This commit is contained in:
parent
3cc4d9ff5d
commit
2b1b40fc12
@ -215,12 +215,12 @@ class Canvas(Widget):
|
|||||||
cell_y = y // magnification
|
cell_y = y // magnification
|
||||||
try:
|
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]):
|
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]
|
# 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]
|
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]
|
style = sel.contained_image.sc[cell_y - sel.region.y][cell_x - sel.region.x]
|
||||||
else:
|
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]
|
# fg = self.image.fg[cell_y][cell_x]
|
||||||
ch = self.image.ch[cell_y][cell_x]
|
ch = self.image.ch[cell_y][cell_x]
|
||||||
style = self.image.sc[cell_y][cell_x]
|
style = self.image.sc[cell_y][cell_x]
|
||||||
|
Loading…
Reference in New Issue
Block a user