diff --git a/src/BizHawk.Client.EmuHawk/tools/Lua/Libraries/TAStudioLuaLibrary.cs b/src/BizHawk.Client.EmuHawk/tools/Lua/Libraries/TAStudioLuaLibrary.cs index d03022007b..f2bb6d35f2 100644 --- a/src/BizHawk.Client.EmuHawk/tools/Lua/Libraries/TAStudioLuaLibrary.cs +++ b/src/BizHawk.Client.EmuHawk/tools/Lua/Libraries/TAStudioLuaLibrary.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.ComponentModel; using System.Drawing; using System.Linq; @@ -327,6 +327,7 @@ namespace BizHawk.Client.EmuHawk Tastudio.CurrentTasMovie.SetAxisState(_changeList[i].Frame, _changeList[i].Button, _changeList[i].ValueAxis); break; } + Tastudio.RefreshForInputChange(_changeList[i].Frame); break; case LuaChangeTypes.InsertFrames: Tastudio.InsertNumFrames(_changeList[i].Frame, _changeList[i].Number); @@ -340,7 +341,6 @@ namespace BizHawk.Client.EmuHawk } } _changeList.Clear(); - Tastudio.RefreshDialog(); Tastudio.JumpToGreenzone(); Tastudio.DoAutoRestore(); } diff --git a/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs b/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs index b2963242dd..d6b98e7766 100644 --- a/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs +++ b/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs @@ -886,6 +886,14 @@ namespace BizHawk.Client.EmuHawk } } + public void RefreshForInputChange(int firstChangedFrame) + { + if (TasView.IsPartiallyVisible(firstChangedFrame) || firstChangedFrame < TasView.FirstVisibleRow) + { + RefreshDialog(); + } + } + private void SetTasViewRowCount() { TasView.RowCount = CurrentTasMovie.InputLogLength + 1; @@ -1061,7 +1069,7 @@ namespace BizHawk.Client.EmuHawk } else { - RefreshDialog(); + RefreshForInputChange(insertionFrame); } } } @@ -1082,7 +1090,7 @@ namespace BizHawk.Client.EmuHawk } else { - RefreshDialog(); + RefreshForInputChange(beginningFrame); } } } @@ -1105,7 +1113,7 @@ namespace BizHawk.Client.EmuHawk } else { - RefreshDialog(); + RefreshForInputChange(beginningFrame); } } }