|
|
@@ -200,7 +200,8 @@ internal class TransformSelectedExecutor : UpdateableChangeExecutor, ITransforma
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- if (document.SoftSelectedStructureMembers.Contains(topMost) || document.SelectedStructureMember?.Id == topMost.Id)
|
|
|
+ if (document.SoftSelectedStructureMembers.Contains(topMost) ||
|
|
|
+ document.SelectedStructureMember?.Id == topMost.Id)
|
|
|
{
|
|
|
Deselect(smallestSizeDifferenceList);
|
|
|
}
|
|
|
@@ -253,15 +254,20 @@ internal class TransformSelectedExecutor : UpdateableChangeExecutor, ITransforma
|
|
|
bool deselectingWasMain = document.SelectedStructureMember?.Id == topMost.Id;
|
|
|
if (deselectingWasMain)
|
|
|
{
|
|
|
- Guid? nextMain = document.SoftSelectedStructureMembers.FirstOrDefault()?.Id;
|
|
|
- List<Guid> softSelected = document.SoftSelectedStructureMembers
|
|
|
+ Guid? nextMain = document.SoftSelectedStructureMembers?.FirstOrDefault()?.Id;
|
|
|
+ List<Guid> softSelected = document.SoftSelectedStructureMembers?
|
|
|
.Select(x => x.Id).Where(x => x != nextMain.Value).ToList();
|
|
|
|
|
|
document.Operations.ClearSoftSelectedMembers();
|
|
|
- document.Operations.SetSelectedMember(nextMain.Value);
|
|
|
+ if (nextMain.HasValue)
|
|
|
+ {
|
|
|
+ document.Operations.SetSelectedMember(nextMain.Value);
|
|
|
+ }
|
|
|
|
|
|
foreach (var guid in softSelected)
|
|
|
{
|
|
|
+ if (guid == Guid.Empty) continue;
|
|
|
+
|
|
|
document.Operations.AddSoftSelectedMember(guid);
|
|
|
}
|
|
|
}
|