mirror of https://github.com/AxioDL/metaforce.git
SplitView bug fixes
This commit is contained in:
parent
dde8624b6b
commit
297c59df2d
|
@ -544,7 +544,10 @@ void RootView::specialKeyDown(boo::ESpecialKey key, boo::EModifierKey mods, bool
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (key == boo::ESpecialKey::Esc && m_splitMenuSystem.m_phase != SplitMenuSystem::Phase::Inactive)
|
if (key == boo::ESpecialKey::Esc && m_splitMenuSystem.m_phase != SplitMenuSystem::Phase::Inactive)
|
||||||
|
{
|
||||||
m_splitMenuSystem.m_phase = SplitMenuSystem::Phase::Inactive;
|
m_splitMenuSystem.m_phase = SplitMenuSystem::Phase::Inactive;
|
||||||
|
return;
|
||||||
|
}
|
||||||
for (View* v : m_views)
|
for (View* v : m_views)
|
||||||
v->specialKeyDown(key, mods, isRepeat);
|
v->specialKeyDown(key, mods, isRepeat);
|
||||||
if (m_activeTextView)
|
if (m_activeTextView)
|
||||||
|
|
|
@ -158,8 +158,7 @@ void Space::mouseMove(const boo::SWindowCoord& coord)
|
||||||
{
|
{
|
||||||
if (m_cornerView.m_view->m_flip)
|
if (m_cornerView.m_view->m_flip)
|
||||||
{
|
{
|
||||||
m_cornerDrag = false;
|
rootView().mouseUp(coord, boo::EMouseButton::Primary, boo::EModifierKey::None);
|
||||||
rootView().unsetActiveDragView(this);
|
|
||||||
rootView().viewManager().deferSpaceSplit(&m_controller, SplitView::Axis::Vertical, 1, coord);
|
rootView().viewManager().deferSpaceSplit(&m_controller, SplitView::Axis::Vertical, 1, coord);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -167,8 +166,7 @@ void Space::mouseMove(const boo::SWindowCoord& coord)
|
||||||
SplitView* sv = findSplitViewOnSide(SplitView::Axis::Vertical, 0);
|
SplitView* sv = findSplitViewOnSide(SplitView::Axis::Vertical, 0);
|
||||||
if (sv)
|
if (sv)
|
||||||
{
|
{
|
||||||
m_cornerDrag = false;
|
rootView().mouseUp(coord, boo::EMouseButton::Primary, boo::EModifierKey::None);
|
||||||
rootView().unsetActiveDragView(this);
|
|
||||||
rootView().beginInteractiveJoin(sv, coord);
|
rootView().beginInteractiveJoin(sv, coord);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -177,8 +175,7 @@ void Space::mouseMove(const boo::SWindowCoord& coord)
|
||||||
{
|
{
|
||||||
if (m_cornerView.m_view->m_flip)
|
if (m_cornerView.m_view->m_flip)
|
||||||
{
|
{
|
||||||
m_cornerDrag = false;
|
rootView().mouseUp(coord, boo::EMouseButton::Primary, boo::EModifierKey::None);
|
||||||
rootView().unsetActiveDragView(this);
|
|
||||||
rootView().viewManager().deferSpaceSplit(&m_controller, SplitView::Axis::Horizontal, 1, coord);
|
rootView().viewManager().deferSpaceSplit(&m_controller, SplitView::Axis::Horizontal, 1, coord);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -186,8 +183,7 @@ void Space::mouseMove(const boo::SWindowCoord& coord)
|
||||||
SplitView* sv = findSplitViewOnSide(SplitView::Axis::Horizontal, 0);
|
SplitView* sv = findSplitViewOnSide(SplitView::Axis::Horizontal, 0);
|
||||||
if (sv)
|
if (sv)
|
||||||
{
|
{
|
||||||
m_cornerDrag = false;
|
rootView().mouseUp(coord, boo::EMouseButton::Primary, boo::EModifierKey::None);
|
||||||
rootView().unsetActiveDragView(this);
|
|
||||||
rootView().beginInteractiveJoin(sv, coord);
|
rootView().beginInteractiveJoin(sv, coord);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -196,8 +192,7 @@ void Space::mouseMove(const boo::SWindowCoord& coord)
|
||||||
{
|
{
|
||||||
if (!m_cornerView.m_view->m_flip)
|
if (!m_cornerView.m_view->m_flip)
|
||||||
{
|
{
|
||||||
m_cornerDrag = false;
|
rootView().mouseUp(coord, boo::EMouseButton::Primary, boo::EModifierKey::None);
|
||||||
rootView().unsetActiveDragView(this);
|
|
||||||
rootView().viewManager().deferSpaceSplit(&m_controller, SplitView::Axis::Vertical, 0, coord);
|
rootView().viewManager().deferSpaceSplit(&m_controller, SplitView::Axis::Vertical, 0, coord);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -205,8 +200,7 @@ void Space::mouseMove(const boo::SWindowCoord& coord)
|
||||||
SplitView* sv = findSplitViewOnSide(SplitView::Axis::Vertical, 1);
|
SplitView* sv = findSplitViewOnSide(SplitView::Axis::Vertical, 1);
|
||||||
if (sv)
|
if (sv)
|
||||||
{
|
{
|
||||||
m_cornerDrag = false;
|
rootView().mouseUp(coord, boo::EMouseButton::Primary, boo::EModifierKey::None);
|
||||||
rootView().unsetActiveDragView(this);
|
|
||||||
rootView().beginInteractiveJoin(sv, coord);
|
rootView().beginInteractiveJoin(sv, coord);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -215,8 +209,7 @@ void Space::mouseMove(const boo::SWindowCoord& coord)
|
||||||
{
|
{
|
||||||
if (!m_cornerView.m_view->m_flip)
|
if (!m_cornerView.m_view->m_flip)
|
||||||
{
|
{
|
||||||
m_cornerDrag = false;
|
rootView().mouseUp(coord, boo::EMouseButton::Primary, boo::EModifierKey::None);
|
||||||
rootView().unsetActiveDragView(this);
|
|
||||||
rootView().viewManager().deferSpaceSplit(&m_controller, SplitView::Axis::Horizontal, 0, coord);
|
rootView().viewManager().deferSpaceSplit(&m_controller, SplitView::Axis::Horizontal, 0, coord);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -224,8 +217,7 @@ void Space::mouseMove(const boo::SWindowCoord& coord)
|
||||||
SplitView* sv = findSplitViewOnSide(SplitView::Axis::Horizontal, 1);
|
SplitView* sv = findSplitViewOnSide(SplitView::Axis::Horizontal, 1);
|
||||||
if (sv)
|
if (sv)
|
||||||
{
|
{
|
||||||
m_cornerDrag = false;
|
rootView().mouseUp(coord, boo::EMouseButton::Primary, boo::EModifierKey::None);
|
||||||
rootView().unsetActiveDragView(this);
|
|
||||||
rootView().beginInteractiveJoin(sv, coord);
|
rootView().beginInteractiveJoin(sv, coord);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -266,12 +258,15 @@ void Space::CornerView::mouseLeave(const boo::SWindowCoord& coord)
|
||||||
SplitView* Space::findSplitViewOnSide(SplitView::Axis axis, int side)
|
SplitView* Space::findSplitViewOnSide(SplitView::Axis axis, int side)
|
||||||
{
|
{
|
||||||
SplitView* ret = dynamic_cast<SplitView*>(&parentView());
|
SplitView* ret = dynamic_cast<SplitView*>(&parentView());
|
||||||
|
View* test = this;
|
||||||
while (ret)
|
while (ret)
|
||||||
{
|
{
|
||||||
if (ret->axis() != axis)
|
if (ret->axis() != axis)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
if (ret->m_views[side ^ 1].m_view == this)
|
if (ret->m_views[side ^ 1].m_view == test)
|
||||||
return ret;
|
return ret;
|
||||||
|
else if (ret->m_views[side].m_view == test)
|
||||||
|
test = ret;
|
||||||
ret = dynamic_cast<SplitView*>(&ret->parentView());
|
ret = dynamic_cast<SplitView*>(&ret->parentView());
|
||||||
}
|
}
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
Loading…
Reference in New Issue