From 446e3a35fc0cacaff15778e4f9fa15ffb70a5a5f Mon Sep 17 00:00:00 2001 From: Etienne Lescot Date: Mon, 16 Mar 2026 12:51:54 +0100 Subject: [PATCH] fix: avoid history checkpoint spam on motion blur drag --- src/components/video-editor/SettingsPanel.tsx | 4 +++- src/components/video-editor/VideoEditor.tsx | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/video-editor/SettingsPanel.tsx b/src/components/video-editor/SettingsPanel.tsx index 92ddec4..ec589ab 100644 --- a/src/components/video-editor/SettingsPanel.tsx +++ b/src/components/video-editor/SettingsPanel.tsx @@ -94,6 +94,7 @@ interface SettingsPanelProps { onBlurChange?: (showBlur: boolean) => void; motionBlurAmount?: number; onMotionBlurChange?: (amount: number) => void; + onMotionBlurCommit?: () => void; borderRadius?: number; onBorderRadiusChange?: (radius: number) => void; onBorderRadiusCommit?: () => void; @@ -159,6 +160,7 @@ export function SettingsPanel({ onBlurChange, motionBlurAmount = 0, onMotionBlurChange, + onMotionBlurCommit, borderRadius = 0, onBorderRadiusChange, onBorderRadiusCommit, @@ -595,7 +597,7 @@ export function SettingsPanel({ onMotionBlurChange?.(values[0])} - onValueCommit={(values) => onMotionBlurChange?.(values[0])} + onValueCommit={() => onMotionBlurCommit?.()} min={0} max={1} step={0.01} diff --git a/src/components/video-editor/VideoEditor.tsx b/src/components/video-editor/VideoEditor.tsx index cae81a4..b3bdb8d 100644 --- a/src/components/video-editor/VideoEditor.tsx +++ b/src/components/video-editor/VideoEditor.tsx @@ -1370,7 +1370,8 @@ export default function VideoEditor() { showBlur={showBlur} onBlurChange={(v) => pushState({ showBlur: v })} motionBlurAmount={motionBlurAmount} - onMotionBlurChange={(v) => pushState({ motionBlurAmount: v })} + onMotionBlurChange={(v) => updateState({ motionBlurAmount: v })} + onMotionBlurCommit={commitState} borderRadius={borderRadius} onBorderRadiusChange={(v) => updateState({ borderRadius: v })} onBorderRadiusCommit={commitState}