mirror of
https://github.com/Trensa-Organization/hy3.git
synced 2025-03-15 18:53:40 +01:00
Make shifting a node in a single node group always break that group
The shifted node will also inherit the size of the group
This commit is contained in:
parent
aec4d6b7da
commit
102360f96a
1 changed files with 8 additions and 1 deletions
|
@ -1415,7 +1415,14 @@ void Hy3Layout::shiftWindow(int workspace, ShiftDirection direction, bool once)
|
|||
Debug::log(LOG, "ShiftWindow %p %d", node, direction);
|
||||
if (node == nullptr) return;
|
||||
|
||||
this->shiftOrGetFocus(*node, direction, true, once, false);
|
||||
if (once && node->parent != nullptr && node->parent->data.as_group.children.size() == 1) {
|
||||
auto* node2 = node->parent;
|
||||
Hy3Node::swapData(*node, *node2);
|
||||
node2->layout->nodes.remove(*node);
|
||||
node2->recalcSizePosRecursive();
|
||||
} else {
|
||||
this->shiftOrGetFocus(*node, direction, true, once, false);
|
||||
}
|
||||
}
|
||||
|
||||
bool shiftIsForward(ShiftDirection direction) {
|
||||
|
|
Loading…
Add table
Reference in a new issue