mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-04-01 03:01:13 -04:00
fix(ui): race condition causing infinite loop when deleting entity
This commit is contained in:
committed by
Kent Keirsey
parent
247517849c
commit
bdc2aec5a4
@@ -295,14 +295,16 @@ export const buildEntityIsHiddenSelector = (entityIdentifier: CanvasEntityIdenti
|
||||
return createSelector(
|
||||
[selectCanvasSlice, selectIsTypeHidden, selectIsStaging, selectShowOnlyRasterLayersWhileStaging],
|
||||
(canvas, isTypeHidden, isStaging, showOnlyRasterLayersWhileStaging) => {
|
||||
const entity = selectEntityOrThrow(canvas, entityIdentifier);
|
||||
const entity = selectEntity(canvas, entityIdentifier);
|
||||
|
||||
// An entity is hidden if:
|
||||
// - The entity type is hidden
|
||||
// - The entity is disabled
|
||||
// - The entity is locked
|
||||
// - The entity is not a raster layer and we are staging and the option to show only raster layers is enabled
|
||||
|
||||
if (!entity) {
|
||||
return true;
|
||||
}
|
||||
if (isTypeHidden) {
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user