ui: Improvements and fixes in graph layouting

* put nodes with bidirectional aggregations on the left
* layout aggregations either horizontal or vertical based on buckets
* exceed bucket height if only one element and vertical split
* fixed hiding nodes in sublayout showed empty spot
This commit is contained in:
Eberhard Graether
2018-04-19 18:54:34 +02:00
parent 1ee4f829a4
commit 5edaedfd37
7 changed files with 67 additions and 64 deletions
@@ -1493,7 +1493,6 @@ void GraphController::groupNodesByParents(GroupType groupType)
m_dummyNodes.push_back(groupNode);
}
std::vector<DummyNode::BundleInfo> bundleInfos;
for (std::shared_ptr<DummyNode> dummyNode : p.second)
{
if (dummyNode->hasActiveSubNode())
@@ -1501,10 +1500,6 @@ void GraphController::groupNodesByParents(GroupType groupType)
groupNode->bundleInfo = dummyNode->bundleInfo;
groupNode->bundleId = dummyNode->bundleId;
}
else
{
bundleInfos.push_back(dummyNode->bundleInfo);
}
groupNode->subNodes.push_back(dummyNode);
m_topLevelAncestorIds[dummyNode->tokenId] = groupNode->tokenId;
@@ -1514,9 +1509,9 @@ void GraphController::groupNodesByParents(GroupType groupType)
if (!groupNode->bundleId)
{
groupNode->bundleId = groupNode->subNodes[0]->bundleId;
groupNode->bundleInfo = DummyNode::BundleInfo::averageBundleInfo(bundleInfos);
}
groupNode->bundleInfo = DummyNode::BundleInfo::averageBundleInfo(groupNode->getBundleInfos());
groupNode->sortSubNodesByName();
}