Browse Source

1) changed UpdateLastState to call UpdateLastState(TState) so that its the only one that has last update control

2) Clear function clean up the states, however currentNode by definition is depends upon one of the state value, hence made that also null,
since there is nothing now to link
pull/1511/head
achal7 8 years ago
parent
commit
16ea6a31fc
  1. 3
      src/Avalonia.Controls/Utils/UndoRedoHelper.cs

3
src/Avalonia.Controls/Utils/UndoRedoHelper.cs

@ -59,7 +59,7 @@ namespace Avalonia.Controls.Utils
public void UpdateLastState()
{
_states.Last.Value = _host.UndoRedoState;
UpdateLastState(_host.UndoRedoState);
}
public void DiscardRedo()
@ -94,6 +94,7 @@ namespace Avalonia.Controls.Utils
public void Clear()
{
_states.Clear();
_currentNode = null;
}
bool WeakTimer.IWeakTimerSubscriber.Tick()

Loading…
Cancel
Save