From 741ae40d4b81833adaa991055dedb656d472ea55 Mon Sep 17 00:00:00 2001 From: Ken Zook Date: Thu, 12 Feb 2026 13:54:00 -0600 Subject: [PATCH] Fix LT-22402 Yellow box error on variant This prevents a yellow box error when clicking into a variant or complex form entry without the entry type set, and then clicking another entry. Change-Id: I4096a145da38f96e4e582040e31708eed5566232 --- Src/LexText/Lexicon/LexEntryChangeHandler.cs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Src/LexText/Lexicon/LexEntryChangeHandler.cs b/Src/LexText/Lexicon/LexEntryChangeHandler.cs index ac8e98f7f0..5b7681dea6 100644 --- a/Src/LexText/Lexicon/LexEntryChangeHandler.cs +++ b/Src/LexText/Lexicon/LexEntryChangeHandler.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2016 SIL International +// Copyright (c) 2016 SIL International // This software is licensed under the LGPL, version 2.1 or later // (http://www.gnu.org/licenses/lgpl-2.1.html) @@ -125,10 +125,8 @@ public void Fixup(bool fRefreshList) if (typelessRefs.Any()) { - var unspecVariantEntryType = (ILexEntryType)m_entry.Cache.LangProject.LexDbOA.VariantEntryTypesOA.PossibilitiesOS - .First(lrt => lrt.Guid == LexEntryTypeTags.kguidLexTypeUnspecifiedVar); - var unspecComplexEntryType = (ILexEntryType)m_entry.Cache.LangProject.LexDbOA.ComplexEntryTypesOA.PossibilitiesOS - .First(lrt => lrt.Guid == LexEntryTypeTags.kguidLexTypeUnspecifiedComplexForm); + var unspecVariantEntryType = (ILexEntryType)m_entry.Cache.ServiceLocator.ObjectRepository.GetObject(LexEntryTypeTags.kguidLexTypeUnspecifiedVar); + var unspecComplexEntryType = (ILexEntryType)m_entry.Cache.ServiceLocator.ObjectRepository.GetObject(LexEntryTypeTags.kguidLexTypeUnspecifiedComplexForm); NonUndoableUnitOfWorkHelper.DoUsingNewOrCurrentUOW(m_cache.ActionHandlerAccessor, () => { foreach (var refEntry in typelessRefs)