diff --git a/frontend/src/components/widgets/inputs/DropdownInput.svelte b/frontend/src/components/widgets/inputs/DropdownInput.svelte index 6c4583484..4317a519f 100644 --- a/frontend/src/components/widgets/inputs/DropdownInput.svelte +++ b/frontend/src/components/widgets/inputs/DropdownInput.svelte @@ -30,6 +30,7 @@ let open = false; $: watchSelectedIndex(selectedIndex); + $: watchEntries(entries); $: watchActiveEntry(activeEntry); $: watchOpen(open); @@ -38,7 +39,13 @@ } // Called only when `selectedIndex` is changed from outside this component - function watchSelectedIndex(_?: number) { + function watchSelectedIndex(_?: typeof selectedIndex) { + activeEntrySkipWatcher = true; + activeEntry = makeActiveEntry(); + } + + // Called only when `entries` is changed from outside this component + function watchEntries(_?: typeof entries) { activeEntrySkipWatcher = true; activeEntry = makeActiveEntry(); } diff --git a/node-graph/gcore/src/raster/image.rs b/node-graph/gcore/src/raster/image.rs index b3b708495..e93fe60ba 100644 --- a/node-graph/gcore/src/raster/image.rs +++ b/node-graph/gcore/src/raster/image.rs @@ -291,7 +291,15 @@ pub fn migrate_image_frame<'de, D: serde::Deserializer<'de>>(deserializer: D) -> *image_frame_table.instance_mut_iter().next().unwrap().alpha_blending = alpha_blending; image_frame_table } - FormatVersions::ImageFrame(image_frame) => RasterDataTable::new(Raster::new_cpu(image_frame.instance_ref_iter().next().unwrap().instance.image.clone())), + FormatVersions::ImageFrame(image_frame) => RasterDataTable::new(Raster::new_cpu( + image_frame + .instance_ref_iter() + .next() + .unwrap_or(Instances::new(ImageFrame::default()).instance_ref_iter().next().unwrap()) + .instance + .image + .clone(), + )), FormatVersions::ImageFrameTable(image_frame_table) => RasterDataTable::new(Raster::new_cpu(image_frame_table.instance_ref_iter().next().unwrap().instance.clone())), FormatVersions::RasterDataTable(raster_data_table) => raster_data_table, })