RamSearch - simplify slightly
This commit is contained in:
parent
eff3f310a8
commit
ebc3ea7ca0
|
@ -311,15 +311,10 @@ namespace BizHawk.Client.Common.RamSearchEngine
|
||||||
|
|
||||||
public void Sort(string column, bool reverse)
|
public void Sort(string column, bool reverse)
|
||||||
{
|
{
|
||||||
_isSorted = false;
|
_isSorted = column == WatchList.Address && !reverse;
|
||||||
switch (column)
|
switch (column)
|
||||||
{
|
{
|
||||||
case WatchList.Address:
|
case WatchList.Address:
|
||||||
if (!reverse)
|
|
||||||
{
|
|
||||||
_isSorted = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
_watchList = _watchList.OrderBy(w => w.Address, reverse).ToList();
|
_watchList = _watchList.OrderBy(w => w.Address, reverse).ToList();
|
||||||
break;
|
break;
|
||||||
case WatchList.Value:
|
case WatchList.Value:
|
||||||
|
@ -334,7 +329,8 @@ namespace BizHawk.Client.Common.RamSearchEngine
|
||||||
_watchList = _watchList
|
_watchList = _watchList
|
||||||
.Cast<IMiniWatchDetails>()
|
.Cast<IMiniWatchDetails>()
|
||||||
.OrderBy(w => w.ChangeCount, reverse)
|
.OrderBy(w => w.ChangeCount, reverse)
|
||||||
.Cast<IMiniWatch>().ToList();
|
.Cast<IMiniWatch>()
|
||||||
|
.ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue