Skip to content

Commit ca3a448

Browse files
authored
Fix LT-22402 Yellow box error on variant (#673)
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
1 parent eb063c8 commit ca3a448

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

Src/LexText/Lexicon/LexEntryChangeHandler.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2016 SIL International
1+
// Copyright (c) 2016 SIL International
22
// This software is licensed under the LGPL, version 2.1 or later
33
// (http://www.gnu.org/licenses/lgpl-2.1.html)
44

@@ -125,10 +125,8 @@ public void Fixup(bool fRefreshList)
125125

126126
if (typelessRefs.Any())
127127
{
128-
var unspecVariantEntryType = (ILexEntryType)m_entry.Cache.LangProject.LexDbOA.VariantEntryTypesOA.PossibilitiesOS
129-
.First(lrt => lrt.Guid == LexEntryTypeTags.kguidLexTypeUnspecifiedVar);
130-
var unspecComplexEntryType = (ILexEntryType)m_entry.Cache.LangProject.LexDbOA.ComplexEntryTypesOA.PossibilitiesOS
131-
.First(lrt => lrt.Guid == LexEntryTypeTags.kguidLexTypeUnspecifiedComplexForm);
128+
var unspecVariantEntryType = (ILexEntryType)m_entry.Cache.ServiceLocator.ObjectRepository.GetObject(LexEntryTypeTags.kguidLexTypeUnspecifiedVar);
129+
var unspecComplexEntryType = (ILexEntryType)m_entry.Cache.ServiceLocator.ObjectRepository.GetObject(LexEntryTypeTags.kguidLexTypeUnspecifiedComplexForm);
132130
NonUndoableUnitOfWorkHelper.DoUsingNewOrCurrentUOW(m_cache.ActionHandlerAccessor, () =>
133131
{
134132
foreach (var refEntry in typelessRefs)

0 commit comments

Comments
 (0)