From d7c6d79148a58264066f5aef450c7414fc289bad Mon Sep 17 00:00:00 2001 From: adelikat Date: Mon, 9 Sep 2013 21:45:44 +0000 Subject: [PATCH] New Watch Editor - fix bug where address wasn't being updated --- BizHawk.MultiClient/tools/Watch/WatchEditor.cs | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/BizHawk.MultiClient/tools/Watch/WatchEditor.cs b/BizHawk.MultiClient/tools/Watch/WatchEditor.cs index fc0dae8331..d445cba14e 100644 --- a/BizHawk.MultiClient/tools/Watch/WatchEditor.cs +++ b/BizHawk.MultiClient/tools/Watch/WatchEditor.cs @@ -278,6 +278,11 @@ namespace BizHawk.MultiClient private void DoEdit() { + if (_watchList.Count == 1) + { + (_watchList[0] as IWatchDetails).Notes = NotesBox.Text; + } + if (_changedSize = true) { for(int i = 0; i < _watchList.Count; i++) @@ -295,7 +300,11 @@ namespace BizHawk.MultiClient size = Watch.WatchSize.DWord; break; } - _watchList[i] = Watch.GenerateWatch(_watchList[i].Domain, _watchList[i].Address.Value, size, details: true); + _watchList[i] = Watch.GenerateWatch( + _watchList[i].Domain, + _watchList.Count == 1 ? AddressBox.ToInt() : _watchList[i].Address.Value, + size, + details: true); } } if (_changedDisplayType) @@ -306,11 +315,6 @@ namespace BizHawk.MultiClient { _watchList.ForEach(x => x.BigEndian = BigEndianCheckBox.Checked); } - - if (_watchList.Count == 1) - { - (_watchList[0] as IWatchDetails).Notes = NotesBox.Text; - } } private void DomainComboBox_SelectedIndexChanged(object sender, EventArgs e)