B2019-139 check if we are on a procedure title or section title that is empty before trying to delete when you move off of the empty title in the step editor.

This commit is contained in:
John Jenko 2019-09-16 15:41:08 +00:00
parent 9dfcfba521
commit c452ad5e13

View File

@ -452,7 +452,8 @@ namespace Volian.Controls.Library
if(value != null) ItemInfo.ConvertInvalidTransitionsToText(value.MyItemInfo);
if (lastEI != null && lastEI.BeingDisposed == false)
{
bool shouldDelete = !lastEI.BeingRemoved && lastEI.Empty && (lastEI.MyItemInfo.MyContent.ContentEntryCount <= 0);
// B2019-139 if a procedure with out a title, or a section without a title, don't try to delete when you are moving off of the title while in the step editor
bool shouldDelete = !lastEI.BeingRemoved && lastEI.Empty && (lastEI.MyItemInfo.MyContent.ContentEntryCount <= 0) && !_SelectedItemInfo.IsProcedure && !_SelectedItemInfo.IsSection;
if (shouldDelete)
{
if (lastEI.HasChildren)