Rollback 6918 since it doesn't work either, and do a fix to Cheats column saving/loading. Neither dialog currently work however
This commit is contained in:
parent
ab7977b267
commit
58e5599f2f
|
@ -238,6 +238,24 @@ namespace BizHawk.Client.EmuHawk
|
|||
ToolHelpers.AddColumn(CheatListView, SIZE, Global.Config.CheatsColumnShow[SIZE], GetColumnWidth(SIZE));
|
||||
ToolHelpers.AddColumn(CheatListView, ENDIAN, Global.Config.CheatsColumnShow[ENDIAN], GetColumnWidth(ENDIAN));
|
||||
ToolHelpers.AddColumn(CheatListView, TYPE, Global.Config.CheatsColumnShow[TYPE], GetColumnWidth(TYPE));
|
||||
|
||||
ColumnPositions();
|
||||
}
|
||||
|
||||
private void ColumnPositions()
|
||||
{
|
||||
var columns = Global.Config.CheatsColumnIndices
|
||||
.Where(x => CheatListView.Columns.ContainsKey(x.Key))
|
||||
.OrderBy(x => x.Value)
|
||||
.ToList();
|
||||
|
||||
for (var i = 0; i < columns.Count; i++)
|
||||
{
|
||||
if (CheatListView.Columns.ContainsKey(columns[i].Key))
|
||||
{
|
||||
CheatListView.Columns[columns[i].Key].DisplayIndex = i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private int GetColumnWidth(string columnName)
|
||||
|
|
|
@ -440,36 +440,43 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
if (WatchListView.Columns[WatchList.ADDRESS] != null)
|
||||
{
|
||||
Global.Config.RamWatchColumnIndexes[WatchList.ADDRESS] = WatchListView.Columns[WatchList.ADDRESS].DisplayIndex;
|
||||
Global.Config.RamWatchColumnWidths[WatchList.ADDRESS] = WatchListView.Columns[WatchList.ADDRESS].Width;
|
||||
}
|
||||
|
||||
if (WatchListView.Columns[WatchList.VALUE] != null)
|
||||
{
|
||||
Global.Config.RamWatchColumnIndexes[WatchList.VALUE] = WatchListView.Columns[WatchList.VALUE].DisplayIndex;
|
||||
Global.Config.RamWatchColumnWidths[WatchList.VALUE] = WatchListView.Columns[WatchList.VALUE].Width;
|
||||
}
|
||||
|
||||
if (WatchListView.Columns[WatchList.PREV] != null)
|
||||
{
|
||||
Global.Config.RamWatchColumnIndexes[WatchList.PREV] = WatchListView.Columns[WatchList.PREV].DisplayIndex;
|
||||
Global.Config.RamWatchColumnWidths[WatchList.PREV] = WatchListView.Columns[WatchList.PREV].Width;
|
||||
}
|
||||
|
||||
if (WatchListView.Columns[WatchList.CHANGES] != null)
|
||||
{
|
||||
Global.Config.RamWatchColumnIndexes[WatchList.CHANGES] = WatchListView.Columns[WatchList.CHANGES].DisplayIndex;
|
||||
Global.Config.RamWatchColumnWidths[WatchList.CHANGES] = WatchListView.Columns[WatchList.CHANGES].Width;
|
||||
}
|
||||
|
||||
if (WatchListView.Columns[WatchList.DIFF] != null)
|
||||
{
|
||||
Global.Config.RamWatchColumnIndexes[WatchList.DIFF] = WatchListView.Columns[WatchList.DIFF].DisplayIndex;
|
||||
Global.Config.RamWatchColumnWidths[WatchList.DIFF] = WatchListView.Columns[WatchList.DIFF].Width;
|
||||
}
|
||||
|
||||
if (WatchListView.Columns[WatchList.DOMAIN] != null)
|
||||
{
|
||||
Global.Config.RamWatchColumnIndexes[WatchList.DOMAIN] = WatchListView.Columns[WatchList.DOMAIN].DisplayIndex;
|
||||
Global.Config.RamWatchColumnWidths[WatchList.DOMAIN] = WatchListView.Columns[WatchList.DOMAIN].Width;
|
||||
}
|
||||
|
||||
if (WatchListView.Columns[WatchList.NOTES] != null)
|
||||
{
|
||||
Global.Config.RamWatchColumnIndexes[WatchList.NOTES] = WatchListView.Columns[WatchList.NOTES].Index;
|
||||
Global.Config.RamWatchColumnWidths[WatchList.NOTES] = WatchListView.Columns[WatchList.NOTES].Width;
|
||||
}
|
||||
}
|
||||
|
@ -1099,40 +1106,13 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void WatchListView_ColumnReordered(object sender, ColumnReorderedEventArgs e)
|
||||
{
|
||||
if (e.Header.Name == WatchList.ADDRESS)
|
||||
{
|
||||
Global.Config.RamWatchColumnIndexes[WatchList.ADDRESS] = e.NewDisplayIndex;
|
||||
}
|
||||
|
||||
if (e.Header.Name == WatchList.VALUE)
|
||||
{
|
||||
Global.Config.RamWatchColumnIndexes[WatchList.VALUE] = e.NewDisplayIndex;
|
||||
}
|
||||
|
||||
if (e.Header.Name == WatchList.PREV)
|
||||
{
|
||||
Global.Config.RamWatchColumnIndexes[WatchList.PREV] = e.NewDisplayIndex;
|
||||
}
|
||||
|
||||
if (e.Header.Name == WatchList.CHANGES)
|
||||
{
|
||||
Global.Config.RamWatchColumnIndexes[WatchList.CHANGES] = e.NewDisplayIndex;
|
||||
}
|
||||
|
||||
if (e.Header.Name == WatchList.DIFF)
|
||||
{
|
||||
Global.Config.RamWatchColumnIndexes[WatchList.DIFF] = e.NewDisplayIndex;
|
||||
}
|
||||
|
||||
if (e.Header.Name == WatchList.DOMAIN)
|
||||
{
|
||||
Global.Config.RamWatchColumnIndexes[WatchList.DOMAIN] = e.NewDisplayIndex;
|
||||
}
|
||||
|
||||
if (e.Header.Name == WatchList.NOTES)
|
||||
{
|
||||
Global.Config.RamWatchColumnIndexes[WatchList.NOTES] = e.NewDisplayIndex;
|
||||
}
|
||||
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)
|
||||
|
|
Loading…
Reference in New Issue