Hi,
I managed to find a bug (a major one at that).
Dragging a divider between two Split nodes laid out horizontally (left to right) beside each other renders dimensions of both nodes to be inconsistent with the actual drag.
Even though one might not prefer to use two horizontal Split nodes side-by-side (instead of combining them to be one split node), I thought that this might fix some bugs (unknown) in the layout.
To reproduce, use the following code for the model:
MultiSplitLayout.Split split1 = new MultiSplitLayout.Split();
split1.setRowLayout(true);
split1.setChildren(Arrays.asList(
new MultiSplitLayout.Leaf("a"),
new MultiSplitLayout.Divider(),
new MultiSplitLayout.Leaf("b")
)
);
MultiSplitLayout.Split modelRoot = new MultiSplitLayout.Split();
modelRoot.setRowLayout(true);
modelRoot.setChildren(Arrays.asList(
split1,
new MultiSplitLayout.Divider(),
new MultiSplitLayout.Leaf("c")
)
);
NOTE:- Do not use parseModel() because it combines (COLUMN a (COLUMN b c)) into (COLUMN a b c).
I have a request/question. Do you have any idea of the difficulty of actually fixing the bug? If you do not have time to fix it, please do respond with a way of fixing it. |