File tree Expand file tree Collapse file tree 1 file changed +20
-2
lines changed
Grabacr07.KanColleViewer/ViewModels/Catalogs Expand file tree Collapse file tree 1 file changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,8 @@ public SortableColumnSelector[] Selectors
75
75
public ShipCatalogSortWorker ( )
76
76
{
77
77
this . UpdateSelectors ( ) ;
78
+
79
+ this . SetFirst ( LevelColumn ) ;
78
80
}
79
81
80
82
public IEnumerable < Ship > Sort ( IEnumerable < Ship > ships )
@@ -96,12 +98,28 @@ public IEnumerable<Ship> Sort(IEnumerable<Ship> ships)
96
98
97
99
public void SetFirst ( SortableColumn column )
98
100
{
99
- if ( this . Selectors . HasItems ( ) )
101
+ if ( ! this . Selectors . HasItems ( ) ) return ;
102
+
103
+ if ( column == StypeColumn )
104
+ {
105
+ // 列ヘッダーから艦種が選択されたときは、艦種 (降順) -> 艦名 (昇順) に設定
106
+ // (ゲーム内の艦種ソートと同じ動作)
107
+
108
+ this . Selectors [ 0 ] . SafeUpdate ( StypeColumn ) ;
109
+ this . Selectors [ 0 ] . SafeUpdate ( false ) ;
110
+ if ( this . Selectors . Length >= 2 )
111
+ {
112
+ this . Selectors [ 1 ] . SafeUpdate ( NameColumn ) ;
113
+ this . Selectors [ 1 ] . SafeUpdate ( true ) ;
114
+ }
115
+ }
116
+ else
100
117
{
101
118
this . Selectors [ 0 ] . SafeUpdate ( column ) ;
102
119
this . Selectors [ 0 ] . SafeUpdate ( ! column . DefaultIsDescending ) ;
103
- this . UpdateSelectors ( ) ;
104
120
}
121
+
122
+ this . UpdateSelectors ( ) ;
105
123
}
106
124
107
125
public void Clear ( )
You can’t perform that action at this time.
0 commit comments