From 2b1b40fc12d8d33837eb43eb1c67fcb341a53ee0 Mon Sep 17 00:00:00 2001 From: Isaiah Odhner Date: Thu, 21 Sep 2023 16:30:37 -0400 Subject: [PATCH] Fix unbound var --- src/textual_paint/canvas.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/textual_paint/canvas.py b/src/textual_paint/canvas.py index 39fb88b..6ed2791 100644 --- a/src/textual_paint/canvas.py +++ b/src/textual_paint/canvas.py @@ -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]