This repository was archived by the owner on May 19, 2021. It is now read-only.
File tree 2 files changed +11
-9
lines changed
2 files changed +11
-9
lines changed Original file line number Diff line number Diff line change 45
45
<setting name =" showGitBranchColumn" serializeAs =" String" >
46
46
<value >False</value >
47
47
</setting >
48
- <setting name =" gridColumnWidths" serializeAs =" Xml" >
49
- <value >
50
- <ArrayOfInt xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
51
- xmlns : xsd =" http://www.w3.org/2001/XMLSchema" >
52
- </ArrayOfInt >
53
- </value >
54
- </setting >
55
48
</UnityLauncher .Properties.Settings>
56
49
</userSettings >
57
50
</configuration >
Original file line number Diff line number Diff line change @@ -871,12 +871,21 @@ private void btnOpenLogFolder_Click(object sender, EventArgs e)
871
871
872
872
private void gridRecent_ColumnWidthChanged ( object sender , DataGridViewColumnEventArgs e )
873
873
{
874
- List < int > gridWidths = new List < int > ( Properties . Settings . Default . gridColumnWidths ) ;
874
+ List < int > gridWidths ;
875
+ if ( Properties . Settings . Default . gridColumnWidths != null )
876
+ {
877
+ gridWidths = new List < int > ( Properties . Settings . Default . gridColumnWidths ) ;
878
+ }
879
+ else
880
+ {
881
+ gridWidths = new List < int > ( ) ;
882
+ }
883
+
875
884
// restore data grid view widths
876
885
var colum = gridRecent . Columns [ 0 ] ;
877
886
for ( int i = 0 ; i < gridRecent . Columns . Count ; ++ i )
878
887
{
879
- if ( Properties . Settings . Default . gridColumnWidths . Length > i )
888
+ if ( Properties . Settings . Default . gridColumnWidths != null && Properties . Settings . Default . gridColumnWidths . Length > i )
880
889
{
881
890
gridWidths [ i ] = gridRecent . Columns [ i ] . Width ;
882
891
}
You can’t perform that action at this time.
0 commit comments