Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't collapse if any visible dockable is not collapsable #368

Merged
merged 1 commit into from
Oct 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Dock.Model/FactoryBase.Dockable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@

Debug.Assert(rootDock.PinnedDock != null);

RemoveAllVisibleDockables(rootDock.PinnedDock);

Check warning on line 356 in src/Dock.Model/FactoryBase.Dockable.cs

View workflow job for this annotation

GitHub Actions / Build ubuntu-latest

Possible null reference argument for parameter 'dock' in 'void FactoryBase.RemoveAllVisibleDockables(IDock dock)'.

Check warning on line 356 in src/Dock.Model/FactoryBase.Dockable.cs

View workflow job for this annotation

GitHub Actions / Build windows-latest

Possible null reference argument for parameter 'dock' in 'void FactoryBase.RemoveAllVisibleDockables(IDock dock)'.

Check warning on line 356 in src/Dock.Model/FactoryBase.Dockable.cs

View workflow job for this annotation

GitHub Actions / Build macos-latest

Possible null reference argument for parameter 'dock' in 'void FactoryBase.RemoveAllVisibleDockables(IDock dock)'.

dockable.OriginalOwner = dockable.Owner;
AddVisibleDockable(rootDock.PinnedDock, dockable);
Expand Down Expand Up @@ -527,9 +527,9 @@
else
{
Debug.Assert(dockable.OriginalOwner is IDock);
var originalOwner = (IDock)dockable.OriginalOwner;

Check warning on line 530 in src/Dock.Model/FactoryBase.Dockable.cs

View workflow job for this annotation

GitHub Actions / Build ubuntu-latest

Converting null literal or possible null value to non-nullable type.

Check warning on line 530 in src/Dock.Model/FactoryBase.Dockable.cs

View workflow job for this annotation

GitHub Actions / Build windows-latest

Converting null literal or possible null value to non-nullable type.

Check warning on line 530 in src/Dock.Model/FactoryBase.Dockable.cs

View workflow job for this annotation

GitHub Actions / Build macos-latest

Converting null literal or possible null value to non-nullable type.
HidePreviewingDockables(rootDock);
AddVisibleDockable(originalOwner, dockable);

Check warning on line 532 in src/Dock.Model/FactoryBase.Dockable.cs

View workflow job for this annotation

GitHub Actions / Build ubuntu-latest

Possible null reference argument for parameter 'dock' in 'void FactoryBase.AddVisibleDockable(IDock dock, IDockable dockable)'.

Check warning on line 532 in src/Dock.Model/FactoryBase.Dockable.cs

View workflow job for this annotation

GitHub Actions / Build windows-latest

Possible null reference argument for parameter 'dock' in 'void FactoryBase.AddVisibleDockable(IDock dock, IDockable dockable)'.

Check warning on line 532 in src/Dock.Model/FactoryBase.Dockable.cs

View workflow job for this annotation

GitHub Actions / Build macos-latest

Possible null reference argument for parameter 'dock' in 'void FactoryBase.AddVisibleDockable(IDock dock, IDockable dockable)'.
}

OnDockableAdded(dockable);
Expand Down Expand Up @@ -755,7 +755,7 @@

var newIsEmpty = dock.VisibleDockables == null
|| dock.VisibleDockables?.Count == 0
|| dock.VisibleDockables!.All(x => x is IDock { IsEmpty: true } or IProportionalDockSplitter);
|| dock.VisibleDockables!.All(x => x is IDock { IsEmpty: true, IsCollapsable: true } or IProportionalDockSplitter);

if (oldIsEmpty != newIsEmpty)
{
Expand Down
Loading