@@ -159,7 +159,7 @@ public MainWindow(SplashScreen sc)
159159 {
160160 if ( ! args [ i ] . EndsWith ( "exe" ) )
161161 {
162- TryLoadSourceFile ( args [ i ] , out _ , false , true , i == 0 ) ;
162+ TryLoadSourceFile ( args [ i ] , out _ , true , i == 0 ) ;
163163 }
164164 if ( args [ i ] . ToLowerInvariant ( ) == "--updateok" )
165165 {
@@ -315,7 +315,7 @@ private void MetroWindow_Drop(object sender, DragEventArgs e)
315315 Debug . Assert ( files != null , nameof ( files ) + " != null" ) ;
316316 for ( var i = 0 ; i < files . Length ; ++ i )
317317 {
318- TryLoadSourceFile ( files [ i ] , out _ , i == 0 , true , i == 0 ) ;
318+ TryLoadSourceFile ( files [ i ] , out _ , true , i == 0 ) ;
319319 }
320320 }
321321 }
@@ -340,7 +340,7 @@ private void EditorObjectBrowserGridRow_WidthChanged(object sender, EventArgs e)
340340 /// <param name="TryOpenIncludes">Whether to open the includes associated with that file</param>
341341 /// <param name="SelectMe">Whether to focus the editor element once the file gets opened</param>
342342 /// <returns>If the file opening was successful or not</returns>
343- public bool TryLoadSourceFile ( string filePath , out EditorElement outEditor , bool UseBlendoverEffect = true , bool TryOpenIncludes = true , bool SelectMe = false )
343+ public bool TryLoadSourceFile ( string filePath , out EditorElement outEditor , bool TryOpenIncludes = true , bool SelectMe = false )
344344 {
345345 outEditor = null ;
346346 var fileInfo = new FileInfo ( filePath ) ;
@@ -430,10 +430,7 @@ public bool TryLoadSourceFile(string filePath, out EditorElement outEditor, bool
430430 return false ;
431431 }
432432
433- if ( UseBlendoverEffect )
434- {
435- BlendOverEffect . Begin ( ) ;
436- }
433+ BlendEffect ( ) ;
437434
438435 return true ;
439436 }
@@ -584,6 +581,17 @@ private void CloseProgram(bool saveAll)
584581 }
585582 }
586583
584+ /// <summary>
585+ /// Begin blend effect if enabled
586+ /// </summary>
587+ private void BlendEffect ( )
588+ {
589+ if ( Program . OptionsObject . Editor_UseBlendEffect )
590+ {
591+ BlendOverEffect . Begin ( ) ;
592+ }
593+ }
594+
587595 public void DimmMainWindow ( )
588596 {
589597 BlendEffectPlane . Fill = new SolidColorBrush ( Colors . Black ) ;
0 commit comments