Skip to content

Commit

Permalink
Update DynamoModelCommands.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
zeusongit committed May 17, 2024
1 parent fd7d21b commit 4d7f8d5
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/DynamoCore/Models/DynamoModelCommands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,15 @@ private void SelectModelImpl(SelectModelCommand command)

private void AddSelectionAndRecordUndo(ModelBase model)
{
WorkspaceModel.RecordModelsForModification(new List<ModelBase>() { model }, CurrentWorkspace.UndoRecorder);
DynamoSelection.Instance.Selection.AddUnique(model);
try
{
WorkspaceModel.RecordModelsForModification(new List<ModelBase>() { model }, CurrentWorkspace.UndoRecorder);
DynamoSelection.Instance.Selection.AddUnique(model);
}
catch (Exception ex)
{
Logger.LogError("Failed to add model(s) to selection." + "\n" + ex.Message);
}
}

private void ClearSelectionAndRecordUndo()
Expand Down

0 comments on commit 4d7f8d5

Please sign in to comment.