From 964977bfdf2534d2162738bb8033b13cc457eba3 Mon Sep 17 00:00:00 2001 From: Marks Polakovs Date: Sat, 11 Apr 2020 16:51:20 +0200 Subject: [PATCH] Disable dragging if an item is loaded for playback (resolves #55) --- src/showplanner/Item.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/showplanner/Item.tsx b/src/showplanner/Item.tsx index a5bd1fb..5a0ca35 100644 --- a/src/showplanner/Item.tsx +++ b/src/showplanner/Item.tsx @@ -28,6 +28,8 @@ export const Item = memo(function Item({ (state: RootState) => state.mixer.players[column] ); + const isLoaded = playerState.loadedItem !== null && itemId(playerState.loadedItem) === id; + const showDebug = useSelector( (state: RootState) => state.settings.showDebugInfo ); @@ -39,7 +41,7 @@ export const Item = memo(function Item({ } return ( - + {(provided, snapshot) => (