lnyan commited on
Commit
cf9f7d8
1 Parent(s): 8abc49f

Fix upload

Browse files
Files changed (1) hide show
  1. index.html +4 -1
index.html CHANGED
@@ -161,12 +161,15 @@ async def upload_func(event):
161
  h,w,_=arr.shape
162
  yo=(base.height-h)//2
163
  xo=(base.width-w)//2
 
 
 
 
164
  base.buffer_dirty=True
165
  base.buffer*=0
166
  base.buffer[yo:yo+h,xo:xo+w,0:3]=arr[:,:,0:3]
167
  base.buffer[yo:yo+h,xo:xo+w,-1]=arr[:,:,-1]
168
  base.draw_buffer()
169
- base.canvas[-2].clear()
170
 
171
 
172
 
 
161
  h,w,_=arr.shape
162
  yo=(base.height-h)//2
163
  xo=(base.width-w)//2
164
+ if base.sel_dirty:
165
+ base.canvas[2].clear()
166
+ base.sel_buffer = base.sel_buffer_bak.copy()
167
+ base.sel_dirty = False
168
  base.buffer_dirty=True
169
  base.buffer*=0
170
  base.buffer[yo:yo+h,xo:xo+w,0:3]=arr[:,:,0:3]
171
  base.buffer[yo:yo+h,xo:xo+w,-1]=arr[:,:,-1]
172
  base.draw_buffer()
 
173
 
174
 
175