Ram Watch - fix Restore defaults when columns are hidden, and rip out the reordered event, it shouldn't be needed, if it is needed it isn't done correctly anyway
This commit is contained in:
parent
58e5599f2f
commit
c5518440c1
|
@ -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);
|
||||
|
|
|
@ -904,35 +904,39 @@ namespace BizHawk.Client.EmuHawk
|
|||
Size = new Size(_defaultWidth, _defaultHeight);
|
||||
|
||||
Global.Config.RamWatchColumnIndexes = new Dictionary<string, int>
|
||||
{
|
||||
{ "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<string, int>
|
||||
{
|
||||
{ "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();
|
||||
|
|
Loading…
Reference in New Issue