more work

This commit is contained in:
itsmattkc
2021-05-21 12:28:52 +10:00
parent 0ce602c132
commit 3c17ecc94e
5 changed files with 90 additions and 31 deletions
+14
View File
@@ -44,6 +44,20 @@ void NodeGraph::Clear()
}
}
qreal NodeGraph::GetNodeContextHeight(void *context)
{
const PositionMap &map = position_map_.value(context);
qreal top = 0, bottom = 0;
foreach (const QPointF &pt, map) {
top = qMin(pt.y(), top);
bottom = qMax(pt.y(), bottom);
}
return bottom - top;
}
void NodeGraph::childEvent(QChildEvent *event)
{
super::childEvent(event);