Skip to content
This repository was archived by the owner on Nov 25, 2023. It is now read-only.

Commit 2db87f7

Browse files
committed
Simplify ScrollLayer
1 parent 536ed26 commit 2db87f7

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/InvvardDev.EZLayoutDisplay.Desktop/ViewModel/DisplayLayoutViewModel.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -386,14 +386,12 @@ private void ScrollLayer(MouseWheelEventArgs e)
386386
{
387387
Logger.TraceRelayCommand();
388388

389-
if (!(e is MouseWheelEventArgs mouseWheelEventArgs)) return;
390-
391-
if (mouseWheelEventArgs.Delta < 0)
389+
if (e.Delta < 0)
392390
{
393391
VaryLayer(1);
394392
}
395393

396-
if (mouseWheelEventArgs.Delta > 0)
394+
if (e.Delta > 0)
397395
{
398396
VaryLayer(-1);
399397
}

0 commit comments

Comments
 (0)