1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-24 02:28:01 +02:00

Merge pull request #902 from bttelle/fix-move-last-from-perm

Respect 'Permanent' on TabbedViews when dragging tabs out
This commit is contained in:
Brian Fiete 2021-02-08 05:06:15 -08:00 committed by GitHub
commit 544c00f2c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -200,7 +200,8 @@ namespace Beefy.widgets
{
return (mTabbedView.mParentDockingFrame.mParentDockingFrame == null) &&
(mTabbedView.mParentDockingFrame.GetDockedWindowCount() == 1) &&
(mTabbedView.GetTabCount() == 1);
(mTabbedView.GetTabCount() == 1) &&
mTabbedView.mAutoClose;
}
void WindowDragLostFocusHandler(BFWindow window, BFWindow newFocus)
@ -288,7 +289,7 @@ namespace Beefy.widgets
if ((refWidget != null) && (refWidget.mWidgetWindow != mWidgetWindow) && (mWidgetWindow != null))
mWidgetWindow.SetForeground();
if (mTabbedView.GetTabCount() == 1)
if ((mTabbedView.GetTabCount() == 1) && mTabbedView.mAutoClose)
{
mTabbedView.Dock(frame, refWidget, align);
return;
@ -327,7 +328,7 @@ namespace Beefy.widgets
tabbedView.Dock(frame, refWidget, align);
}
if (prevTabbedView.GetTabCount() == 0)
if ((prevTabbedView.GetTabCount() == 0) && prevTabbedView.mAutoClose)
{
prevTabbedView.mParentDockingFrame.RemoveDockedWidget(prevTabbedView);
}