mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-24 18:48: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:
commit
544c00f2c3
1 changed files with 4 additions and 3 deletions
|
@ -200,7 +200,8 @@ namespace Beefy.widgets
|
||||||
{
|
{
|
||||||
return (mTabbedView.mParentDockingFrame.mParentDockingFrame == null) &&
|
return (mTabbedView.mParentDockingFrame.mParentDockingFrame == null) &&
|
||||||
(mTabbedView.mParentDockingFrame.GetDockedWindowCount() == 1) &&
|
(mTabbedView.mParentDockingFrame.GetDockedWindowCount() == 1) &&
|
||||||
(mTabbedView.GetTabCount() == 1);
|
(mTabbedView.GetTabCount() == 1) &&
|
||||||
|
mTabbedView.mAutoClose;
|
||||||
}
|
}
|
||||||
|
|
||||||
void WindowDragLostFocusHandler(BFWindow window, BFWindow newFocus)
|
void WindowDragLostFocusHandler(BFWindow window, BFWindow newFocus)
|
||||||
|
@ -288,7 +289,7 @@ namespace Beefy.widgets
|
||||||
if ((refWidget != null) && (refWidget.mWidgetWindow != mWidgetWindow) && (mWidgetWindow != null))
|
if ((refWidget != null) && (refWidget.mWidgetWindow != mWidgetWindow) && (mWidgetWindow != null))
|
||||||
mWidgetWindow.SetForeground();
|
mWidgetWindow.SetForeground();
|
||||||
|
|
||||||
if (mTabbedView.GetTabCount() == 1)
|
if ((mTabbedView.GetTabCount() == 1) && mTabbedView.mAutoClose)
|
||||||
{
|
{
|
||||||
mTabbedView.Dock(frame, refWidget, align);
|
mTabbedView.Dock(frame, refWidget, align);
|
||||||
return;
|
return;
|
||||||
|
@ -327,7 +328,7 @@ namespace Beefy.widgets
|
||||||
tabbedView.Dock(frame, refWidget, align);
|
tabbedView.Dock(frame, refWidget, align);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (prevTabbedView.GetTabCount() == 0)
|
if ((prevTabbedView.GetTabCount() == 0) && prevTabbedView.mAutoClose)
|
||||||
{
|
{
|
||||||
prevTabbedView.mParentDockingFrame.RemoveDockedWidget(prevTabbedView);
|
prevTabbedView.mParentDockingFrame.RemoveDockedWidget(prevTabbedView);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue