Spaces:
Runtime error
Runtime error
Fix unsync canvas after export
Browse files
canvas.py
CHANGED
@@ -208,7 +208,7 @@ class InfCanvas:
|
|
208 |
elif self.mouse_state == BRUSH_MODE:
|
209 |
if self.sel_dirty:
|
210 |
self.write_selection_to_buffer()
|
211 |
-
self.canvas[2].clear()
|
212 |
self.buffer_dirty=True
|
213 |
bx0,by0=int(x)-self.grid_size//2,int(y)-self.grid_size//2
|
214 |
bx1,by1=bx0+self.grid_size,by0+self.grid_size
|
@@ -478,6 +478,7 @@ class InfCanvas:
|
|
478 |
self.sel_buffer = self.sel_buffer_bak.copy()
|
479 |
self.buffer_dirty = True
|
480 |
self.buffer_updated = True
|
|
|
481 |
|
482 |
def read_selection_from_buffer(self):
|
483 |
x0, y0 = self.cursor
|
|
|
208 |
elif self.mouse_state == BRUSH_MODE:
|
209 |
if self.sel_dirty:
|
210 |
self.write_selection_to_buffer()
|
211 |
+
# self.canvas[2].clear()
|
212 |
self.buffer_dirty=True
|
213 |
bx0,by0=int(x)-self.grid_size//2,int(y)-self.grid_size//2
|
214 |
bx1,by1=bx0+self.grid_size,by0+self.grid_size
|
|
|
478 |
self.sel_buffer = self.sel_buffer_bak.copy()
|
479 |
self.buffer_dirty = True
|
480 |
self.buffer_updated = True
|
481 |
+
self.canvas[2].clear()
|
482 |
|
483 |
def read_selection_from_buffer(self):
|
484 |
x0, y0 = self.cursor
|