From e728c24f82f263db81b340d999450f78830d92da Mon Sep 17 00:00:00 2001 From: luboslenco Date: Wed, 17 Jul 2024 21:24:52 +0200 Subject: [PATCH] Only reorder tabs when positions differ --- base/Sources/ui_base.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/base/Sources/ui_base.ts b/base/Sources/ui_base.ts index d608c5ad..013aa238 100644 --- a/base/Sources/ui_base.ts +++ b/base/Sources/ui_base.ts @@ -1737,6 +1737,9 @@ function ui_base_on_tab_drop(to: zui_handle_t, to_position: i32, from: zui_handl j = k; } } + if (i == j && to_position == from_position) { + return; + } if (i > -1 && j > -1) { let tabsi: tab_draw_t[] = ui_base_hwnd_tabs[i]; let tabsj: tab_draw_t[] = ui_base_hwnd_tabs[j];