File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1350,9 +1350,6 @@ def delete_regions(self, region_indices: list):
13501350
13511351 # 清除选择
13521352 self .model .set_selection ([])
1353-
1354- except Exception as e :
1355- self .logger .error (f"[DELETE] 删除区域时发生错误: { e } " , exc_info = True )
13561353
13571354 def enter_drawing_mode (self ):
13581355 """进入绘制模式以添加新文本框"""
Original file line number Diff line number Diff line change @@ -233,20 +233,22 @@ echo.
233233
234234echo [警告] 将强制同步到远程分支,本地修改将被覆盖
235235set /p confirm = " 是否继续更新? (y/n): "
236- if /i not " !confirm! " == " y" (
237- echo 取消更新
238- goto menu
239- )
236+ if /i not " !confirm! " == " y" goto :update_code_cancel
237+
238+ echo .
239+ echo 获取远程更新...
240+ " !GIT! " fetch origin
240241
241242echo .
242243echo 正在强制同步到远程分支...
243- " %GIT% " reset --hard origin/main
244+ " !GIT! " reset --hard origin/main && echo [OK] 代码更新完成 && goto :update_code_done
245+ echo [ERROR] 代码更新失败
246+ goto :update_code_done
244247
245- if %ERRORLEVEL% == 0 (
246- echo [OK] 代码更新完成
247- ) else (
248- echo [ERROR] 代码更新失败
249- )
248+ :update_code_cancel
249+ echo 取消更新
250+
251+ :update_code_done
250252pause
251253goto menu
252254
@@ -298,18 +300,20 @@ if /i not "!confirm!"=="y" (
298300
299301echo .
300302echo 获取远程更新...
301- " % GIT% " fetch origin
303+ " ! GIT! " fetch origin
302304
303305echo .
304306echo 正在强制同步到远程分支...
305- " %GIT% " reset --hard origin/main
306-
307- if %ERRORLEVEL% neq 0 (
308- echo [ERROR] 代码更新失败
309- pause
310- goto menu
311- )
307+ " !GIT! " reset --hard origin/main || goto :full_update_code_failed
312308echo [OK] 代码更新完成
309+ goto :full_update_deps
310+
311+ :full_update_code_failed
312+ echo [ERROR] 代码更新失败
313+ pause
314+ goto menu
315+
316+ :full_update_deps
313317
314318echo .
315319echo [2/2] 更新依赖...
You can’t perform that action at this time.
0 commit comments