Make sure we don't have selections on save
Started work on align object 2
This commit is contained in:
parent
68e60ed897
commit
61e68b6afa
9 changed files with 528 additions and 31 deletions
|
|
@ -2135,22 +2135,13 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
if (e.InvalidateType.HasFlag(InvalidateType.Name))
|
||||
{
|
||||
// clear and restore the selection so we have the name change
|
||||
var lastSelectedItem = Scene.SelectedItem;
|
||||
if (!rebuildTreePending)
|
||||
using (new ClearThenRestorSelection(Scene))
|
||||
{
|
||||
rebuildTreePending = true;
|
||||
UiThread.RunOnIdle(this.RebuildTree);
|
||||
}
|
||||
|
||||
Scene.SelectedItem = null;
|
||||
// Adding a group of parts to a bed when there are multiple existing parts already selected
|
||||
// will create duplicates if any of the new parts need to be renamed. Since the old selection
|
||||
// group will be replaced with a new selection group containing the newly-added parts, just
|
||||
// clear the selection. (Don't select if the selection was a selection group or has insertion groups
|
||||
// still processing).
|
||||
if (!(lastSelectedItem is SelectionGroupObject3D) || !Scene.Children.Any(c => c is InsertionGroupObject3D))
|
||||
{
|
||||
Scene.SelectedItem = lastSelectedItem;
|
||||
if (!rebuildTreePending)
|
||||
{
|
||||
rebuildTreePending = true;
|
||||
UiThread.RunOnIdle(this.RebuildTree);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue