mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
Closes #1909
This commit is contained in:
parent
45a53bf0a4
commit
28a0e4c63c
2 changed files with 7 additions and 7 deletions
|
@ -241,6 +241,7 @@ void SplitContainer::setSelected(Split *split)
|
||||||
|
|
||||||
if (Node *node = this->baseNode_.findNodeContainingSplit(split))
|
if (Node *node = this->baseNode_.findNodeContainingSplit(split))
|
||||||
{
|
{
|
||||||
|
this->focusSplitRecursive(node);
|
||||||
this->setPreferedTargetRecursive(node);
|
this->setPreferedTargetRecursive(node);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -331,7 +332,7 @@ void SplitContainer::selectSplitRecursive(Node *node, Direction direction)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this->focusSplitRecursive(
|
this->focusSplitRecursive(
|
||||||
siblings[it - siblings.begin() - 1].get(), direction);
|
siblings[it - siblings.begin() - 1].get());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -343,7 +344,7 @@ void SplitContainer::selectSplitRecursive(Node *node, Direction direction)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this->focusSplitRecursive(
|
this->focusSplitRecursive(
|
||||||
siblings[it - siblings.begin() + 1].get(), direction);
|
siblings[it - siblings.begin() + 1].get());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -354,7 +355,7 @@ void SplitContainer::selectSplitRecursive(Node *node, Direction direction)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SplitContainer::focusSplitRecursive(Node *node, Direction direction)
|
void SplitContainer::focusSplitRecursive(Node *node)
|
||||||
{
|
{
|
||||||
switch (node->type_)
|
switch (node->type_)
|
||||||
{
|
{
|
||||||
|
@ -374,12 +375,11 @@ void SplitContainer::focusSplitRecursive(Node *node, Direction direction)
|
||||||
|
|
||||||
if (it != children.end())
|
if (it != children.end())
|
||||||
{
|
{
|
||||||
this->focusSplitRecursive(it->get(), direction);
|
this->focusSplitRecursive(it->get());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this->focusSplitRecursive(node->children_.front().get(),
|
this->focusSplitRecursive(node->children_.front().get());
|
||||||
direction);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -216,7 +216,7 @@ protected:
|
||||||
private:
|
private:
|
||||||
void layout();
|
void layout();
|
||||||
void selectSplitRecursive(Node *node, Direction direction);
|
void selectSplitRecursive(Node *node, Direction direction);
|
||||||
void focusSplitRecursive(Node *node, Direction direction);
|
void focusSplitRecursive(Node *node);
|
||||||
void setPreferedTargetRecursive(Node *node);
|
void setPreferedTargetRecursive(Node *node);
|
||||||
|
|
||||||
void addSplit(Split *split);
|
void addSplit(Split *split);
|
||||||
|
|
Loading…
Reference in a new issue