diff --git a/BizHawk.Client.EmuHawk/tools/Watch/RamWatch.Designer.cs b/BizHawk.Client.EmuHawk/tools/Watch/RamWatch.Designer.cs index 0a509a7b03..ffc6e77688 100644 --- a/BizHawk.Client.EmuHawk/tools/Watch/RamWatch.Designer.cs +++ b/BizHawk.Client.EmuHawk/tools/Watch/RamWatch.Designer.cs @@ -885,7 +885,6 @@ this.WatchListView.UseCompatibleStateImageBehavior = false; this.WatchListView.View = System.Windows.Forms.View.Details; this.WatchListView.ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(this.WatchListView_ColumnClick); - this.WatchListView.ColumnReordered += new System.Windows.Forms.ColumnReorderedEventHandler(this.WatchListView_ColumnReordered); this.WatchListView.DragDrop += new System.Windows.Forms.DragEventHandler(this.NewRamWatch_DragDrop); this.WatchListView.DragEnter += new System.Windows.Forms.DragEventHandler(this.NewRamWatch_DragEnter); this.WatchListView.KeyDown += new System.Windows.Forms.KeyEventHandler(this.WatchListView_KeyDown); diff --git a/BizHawk.Client.EmuHawk/tools/Watch/RamWatch.cs b/BizHawk.Client.EmuHawk/tools/Watch/RamWatch.cs index 1868adc1ea..d4ef1b9a45 100644 --- a/BizHawk.Client.EmuHawk/tools/Watch/RamWatch.cs +++ b/BizHawk.Client.EmuHawk/tools/Watch/RamWatch.cs @@ -904,35 +904,39 @@ namespace BizHawk.Client.EmuHawk Size = new Size(_defaultWidth, _defaultHeight); Global.Config.RamWatchColumnIndexes = new Dictionary - { - { "AddressColumn", 0 }, - { "ValueColumn", 1 }, - { "PrevColumn", 2 }, - { "ChangesColumn", 3 }, - { "DiffColumn", 4 }, - { "DomainColumn", 5 }, - { "NotesColumn", 6 }, - }; + { + { "AddressColumn", 0 }, + { "ValueColumn", 1 }, + { "PrevColumn", 2 }, + { "ChangesColumn", 3 }, + { "DiffColumn", 4 }, + { "DomainColumn", 5 }, + { "NotesColumn", 6 }, + }; - ColumnPositions(); + Global.Config.RamWatchColumnWidths = new Dictionary + { + { "AddressColumn", -1 }, + { "ValueColumn", -1 }, + { "PrevColumn", -1 }, + { "ChangesColumn", -1 }, + { "DiffColumn", -1 }, + { "DomainColumn", -1 }, + { "NotesColumn", -1 }, + }; Global.Config.RamWatchShowChangeColumn = true; Global.Config.RamWatchShowDomainColumn = true; Global.Config.RamWatchShowPrevColumn = false; Global.Config.RamWatchShowDiffColumn = false; - WatchListView.Columns[WatchList.ADDRESS].Width = _defaultColumnWidths[WatchList.ADDRESS]; - WatchListView.Columns[WatchList.VALUE].Width = _defaultColumnWidths[WatchList.VALUE]; - WatchListView.Columns[WatchList.CHANGES].Width = _defaultColumnWidths[WatchList.CHANGES]; - WatchListView.Columns[WatchList.DOMAIN].Width = _defaultColumnWidths[WatchList.DOMAIN]; - WatchListView.Columns[WatchList.NOTES].Width = _defaultColumnWidths[WatchList.NOTES]; - Global.Config.DisplayRamWatch = false; Global.Config.RamWatchSettings.SaveWindowPosition = true; Global.Config.RamWatchSettings.TopMost = TopMost = false; Global.Config.RamWatchSettings.FloatingWindow = false; RefreshFloatingWindowControl(); + ColumnPositions(); LoadColumnInfo(); } @@ -1104,17 +1108,6 @@ namespace BizHawk.Client.EmuHawk OrderColumn(e.Column); } - private void WatchListView_ColumnReordered(object sender, ColumnReorderedEventArgs e) - { - Global.Config.RamWatchColumnIndexes[WatchList.ADDRESS] = WatchListView.Columns[WatchList.ADDRESS].DisplayIndex; - Global.Config.RamWatchColumnIndexes[WatchList.VALUE] = WatchListView.Columns[WatchList.VALUE].DisplayIndex; - Global.Config.RamWatchColumnIndexes[WatchList.PREV] = WatchListView.Columns[WatchList.ADDRESS].DisplayIndex; - Global.Config.RamWatchColumnIndexes[WatchList.CHANGES] = WatchListView.Columns[WatchList.CHANGES].DisplayIndex; - Global.Config.RamWatchColumnIndexes[WatchList.DIFF] = WatchListView.Columns[WatchList.DIFF].DisplayIndex; - Global.Config.RamWatchColumnIndexes[WatchList.DOMAIN] = WatchListView.Columns[WatchList.DOMAIN].DisplayIndex; - Global.Config.RamWatchColumnIndexes[WatchList.NOTES] = WatchListView.Columns[WatchList.NOTES].DisplayIndex; - } - protected override void OnShown(EventArgs e) { RefreshFloatingWindowControl();