Skip to content

Commit 99378d5

Browse files
Fix null reference exception when undoing annotations and trying to draw the next one;
Remove undo/redo buttons from AnnotationUI
1 parent f09bc95 commit 99378d5

3 files changed

Lines changed: 92 additions & 1454 deletions

File tree

Tools/AnnotationTool/AnnotationTool.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -282,9 +282,6 @@ void Start()
282282
activator.showColorPicker = ShowColorPicker;
283283
activator.hideColorPicker = HideColorPicker;
284284

285-
activator.undoButtonClick += Undo.PerformUndo;
286-
activator.redoButtonClick += Undo.PerformRedo;
287-
288285
var controls = new BindingDictionary();
289286
InputUtils.GetBindingDictionaryFromActionMap(m_ActionMap, controls);
290287

@@ -451,7 +448,6 @@ void SetupHolder()
451448
if (!newSession)
452449
{
453450
newSession = new GameObject(string.Format(k_GroupFormatString, m_AnnotationRoot.childCount));
454-
Undo.RegisterCreatedObjectUndo(newSession, "Annotation");
455451
newSession.transform.position = GetPointerPosition();
456452
m_Groups.Add(newSession);
457453
}

0 commit comments

Comments
 (0)