mirror of
https://github.com/Trensa-Organization/hy3.git
synced 2025-03-15 18:53:40 +01:00
Fix moving focus to a group not focusing last focused node
This commit is contained in:
parent
d99df236c5
commit
3a2ec87255
1 changed files with 3 additions and 1 deletions
|
@ -1473,7 +1473,9 @@ Hy3Node* Hy3Layout::shiftOrGetFocus(Hy3Node& node, ShiftDirection direction, boo
|
|||
|
||||
bool shift_after = false;
|
||||
|
||||
if (shiftMatchesLayout(group_data.layout, direction)) {
|
||||
if (!shift && group_data.layout == Hy3GroupLayout::Tabbed && group_data.focused_child != nullptr) {
|
||||
iter = std::find(group_data.children.begin(), group_data.children.end(), group_data.focused_child);
|
||||
} else if (shiftMatchesLayout(group_data.layout, direction)) {
|
||||
// if the group has the same orientation as movement pick the last/first child based
|
||||
// on movement direction
|
||||
if (shiftIsForward(direction)) iter = group_data.children.begin();
|
||||
|
|
Loading…
Add table
Reference in a new issue