@@ -128,7 +128,7 @@ public MainWindow()
128
128
Start ( ) ;
129
129
}
130
130
131
- void Start ( )
131
+ void Start ( bool loadSettings = true )
132
132
{
133
133
w = ( MainWindow ) Application . Current . MainWindow ;
134
134
windowTitle = w . Title ;
@@ -148,7 +148,7 @@ void Start()
148
148
darkColor . Alpha = gridAlpha ;
149
149
150
150
// get values from settings
151
- LoadSettings ( ) ;
151
+ if ( loadSettings == true ) LoadSettings ( ) ;
152
152
153
153
// setup background grid
154
154
gridBitmap = new WriteableBitmap ( canvasResolutionX , canvasResolutionY , dpiX , dpiY , PixelFormats . Bgra32 , null ) ;
@@ -1388,7 +1388,7 @@ private void drawingImage_MouseEnter(object sender, MouseEventArgs e)
1388
1388
private void OnClearButton ( object sender , MouseButtonEventArgs e )
1389
1389
{
1390
1390
// shiftdown or right button, just clear without dialog
1391
- if ( leftShiftDown == true || e . RightButton == MouseButtonState . Pressed )
1391
+ if ( leftShiftDown == true || ( e != null && e . RightButton == MouseButtonState . Pressed ) )
1392
1392
{
1393
1393
ClearImage ( canvasBitmap , emptyRect , emptyPixels , emptyStride ) ;
1394
1394
UpdateOutline ( ) ;
@@ -1417,8 +1417,8 @@ private void OnClearButton(object sender, MouseButtonEventArgs e)
1417
1417
canvasResolutionX = ( int ) dlg . sliderResolution . Value ;
1418
1418
canvasResolutionY = ( int ) dlg . sliderResolution . Value ;
1419
1419
1420
- // TODO no need to do full start
1421
- Start ( ) ;
1420
+ // TODO no need to do full start?
1421
+ Start ( false ) ;
1422
1422
1423
1423
break ;
1424
1424
case false : // cancelled
0 commit comments