File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -142,10 +142,27 @@ private void LoadSettings()
142142 }
143143
144144 // Restore window size and position
145- if ( Properties . Settings . Default . WindowH > 0 )
145+ if ( Properties . Settings . Default . WindowH < 100 || Properties . Settings . Default . WindowX < 0 || Properties . Settings . Default . WindowY < 0 )
146146 {
147- Height = ( int ) Properties . Settings . Default . WindowH ;
147+ if ( Properties . Settings . Default . WindowH < 100 )
148+ {
149+ Properties . Settings . Default . WindowH = 400 ;
150+ }
151+
152+ if ( Properties . Settings . Default . WindowX < 0 )
153+ {
154+ Properties . Settings . Default . WindowX = 0 ;
155+ }
156+
157+ if ( Properties . Settings . Default . WindowY < 0 )
158+ {
159+ Properties . Settings . Default . WindowY = 0 ;
160+ }
161+
162+ Properties . Settings . Default . Save ( ) ;
148163 }
164+
165+ Height = ( int ) Properties . Settings . Default . WindowH ;
149166 Left = ( int ) Properties . Settings . Default . WindowX ;
150167 Top = ( int ) Properties . Settings . Default . WindowY ;
151168
You can’t perform that action at this time.
0 commit comments