fix: shift to close tabs causes switching

This commit is contained in:
hstyi
2025-01-25 21:05:42 +08:00
committed by hstyi
parent 75f21db325
commit 8b7efefbdb

View File

@@ -44,6 +44,12 @@ class MyTabbedPane : FlatTabbedPane() {
tabCloseCallback?.accept(this, index) tabCloseCallback?.accept(this, index)
return return
} }
} else if (e.id == MouseEvent.MOUSE_PRESSED && isShiftPressedOnly(e.modifiersEx)) {
val index = indexAtLocation(e.x, e.y)
if (index >= 0) {
return
}
return
} }
super.processMouseEvent(e) super.processMouseEvent(e)
} }