@@ -159,7 +159,7 @@ public MainWindow(SplashScreen sc)
159
159
{
160
160
if ( ! args [ i ] . EndsWith ( "exe" ) )
161
161
{
162
- TryLoadSourceFile ( args [ i ] , out _ , false , true , i == 0 ) ;
162
+ TryLoadSourceFile ( args [ i ] , out _ , true , i == 0 ) ;
163
163
}
164
164
if ( args [ i ] . ToLowerInvariant ( ) == "--updateok" )
165
165
{
@@ -315,7 +315,7 @@ private void MetroWindow_Drop(object sender, DragEventArgs e)
315
315
Debug . Assert ( files != null , nameof ( files ) + " != null" ) ;
316
316
for ( var i = 0 ; i < files . Length ; ++ i )
317
317
{
318
- TryLoadSourceFile ( files [ i ] , out _ , i == 0 , true , i == 0 ) ;
318
+ TryLoadSourceFile ( files [ i ] , out _ , true , i == 0 ) ;
319
319
}
320
320
}
321
321
}
@@ -340,7 +340,7 @@ private void EditorObjectBrowserGridRow_WidthChanged(object sender, EventArgs e)
340
340
/// <param name="TryOpenIncludes">Whether to open the includes associated with that file</param>
341
341
/// <param name="SelectMe">Whether to focus the editor element once the file gets opened</param>
342
342
/// <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 )
344
344
{
345
345
outEditor = null ;
346
346
var fileInfo = new FileInfo ( filePath ) ;
@@ -430,10 +430,7 @@ public bool TryLoadSourceFile(string filePath, out EditorElement outEditor, bool
430
430
return false ;
431
431
}
432
432
433
- if ( UseBlendoverEffect )
434
- {
435
- BlendOverEffect . Begin ( ) ;
436
- }
433
+ BlendEffect ( ) ;
437
434
438
435
return true ;
439
436
}
@@ -584,6 +581,17 @@ private void CloseProgram(bool saveAll)
584
581
}
585
582
}
586
583
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
+
587
595
public void DimmMainWindow ( )
588
596
{
589
597
BlendEffectPlane . Fill = new SolidColorBrush ( Colors . Black ) ;
0 commit comments