This repository was archived by the owner on May 19, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +11
-9
lines changed Expand file tree Collapse file tree 2 files changed +11
-9
lines changed Original file line number Diff line number Diff line change 4545 <setting name =" showGitBranchColumn" serializeAs =" String" >
4646 <value >False</value >
4747 </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 >
5548 </UnityLauncher .Properties.Settings>
5649 </userSettings >
5750</configuration >
Original file line number Diff line number Diff line change @@ -871,12 +871,21 @@ private void btnOpenLogFolder_Click(object sender, EventArgs e)
871871
872872 private void gridRecent_ColumnWidthChanged ( object sender , DataGridViewColumnEventArgs e )
873873 {
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+
875884 // restore data grid view widths
876885 var colum = gridRecent . Columns [ 0 ] ;
877886 for ( int i = 0 ; i < gridRecent . Columns . Count ; ++ i )
878887 {
879- if ( Properties . Settings . Default . gridColumnWidths . Length > i )
888+ if ( Properties . Settings . Default . gridColumnWidths != null && Properties . Settings . Default . gridColumnWidths . Length > i )
880889 {
881890 gridWidths [ i ] = gridRecent . Columns [ i ] . Width ;
882891 }
You can’t perform that action at this time.
0 commit comments