Skip to content

Commit 16a105f

Browse files
committed
block buggy floatdockable
1 parent 055146a commit 16a105f

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

src/OneWare.Core/Services/MainDockService.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,20 @@ public IExtendedDocument? CurrentDocument
115115
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(CurrentDocument)));
116116
}
117117
}
118+
119+
public override void FloatDockable(IDockable dockable)
120+
{
121+
// Blocking this for now to make sure we don't float pinned dockables in a way where they get duplicated
122+
if (dockable is ToolDock { ActiveDockable: { } ad })
123+
{
124+
var pinned = Layout?.RightPinnedDockables?.Contains(ad) ?? Layout?.LeftPinnedDockables?.Contains(ad) ??
125+
Layout?.TopPinnedDockables?.Contains(ad) ??
126+
Layout?.BottomPinnedDockables?.Contains(ad) ?? false;
127+
128+
if (pinned) return;
129+
}
130+
base.FloatDockable(dockable);
131+
}
118132

119133
public void RegisterDocumentView<T>(params string[] extensions) where T : IExtendedDocument
120134
{

0 commit comments

Comments
 (0)