Skip to content

Commit

Permalink
Fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
wieslawsoltes committed Nov 28, 2024
1 parent efd1db1 commit 9b5a3a3
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
6 changes: 5 additions & 1 deletion src/Dock.Avalonia/Internal/DockControlState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using System.Collections.Generic;
using Avalonia;
using Avalonia.Controls;
using Avalonia.Input;
using Avalonia.VisualTree;
using Dock.Avalonia.Controls;
using Dock.Model.Core;
Expand Down Expand Up @@ -141,6 +140,11 @@ private void Execute(Point point, DockOperation operation, DragAction dragAction
{
if (sourceDockable is IDock dock)
{
if (dock.ActiveDockable == null)
{
return;
}

sourceDockable = dock.ActiveDockable;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public void Lays_Out_Children_Vertical()
Assert.Equal(new Rect(0, 152, 100, 148), target.Children[2].Bounds);
}

private static IEnumerable<object[]> GetBorderTestsData()
public static IEnumerable<object[]> GetBorderTestsData()
{
yield return [0.5, 604, 300, 300];
yield return [0.25, 604, 150, 450];
Expand Down
2 changes: 1 addition & 1 deletion tests/Dock.Model.Mvvm.UnitTests/FactoryTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public void CreateList_Creates_ReactiveList_Empty()
var actual = factory.CreateList<IDockable>();
Assert.NotNull(actual);
Assert.IsType<ObservableCollection<IDockable>>(actual);
Assert.Equal(0, actual.Count);
Assert.Empty(actual);
}

[Fact]
Expand Down
4 changes: 2 additions & 2 deletions tests/Dock.Model.ReactiveUI.UnitTests/FactoryTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public void CreateList_Creates_ReactiveList_Empty()
var actual = factory.CreateList<IDockable>();
Assert.NotNull(actual);
Assert.IsType<ObservableCollection<IDockable>>(actual);
Assert.Equal(0, actual.Count);
Assert.Empty(actual);
}

[Fact]
Expand Down Expand Up @@ -101,4 +101,4 @@ public void CreateLayout_Creates_RootDock()

public class TestFactory : Factory
{
}
}

0 comments on commit 9b5a3a3

Please sign in to comment.