Fix arrange when same node title
This commit is contained in:
parent
750868c63f
commit
0dbd10b5e3
1 changed files with 14 additions and 10 deletions
|
|
@ -491,16 +491,20 @@ void WarpGraphModel::refreshFromClient() {
|
|||
if (pendingIt != m_pendingPositions.end()) {
|
||||
m_positions.emplace(qtId, pendingIt->second);
|
||||
m_pendingPositions.erase(pendingIt);
|
||||
} else {
|
||||
auto groupPos = findAppGroupPosition(nodeIt->second);
|
||||
if (groupPos) {
|
||||
m_positions.emplace(qtId, findNonOverlappingPosition(*groupPos, nodeIt->second));
|
||||
} else {
|
||||
auto savedIt = m_savedPositions.find(nodeInfo.name);
|
||||
if (savedIt != m_savedPositions.end()) {
|
||||
m_positions.emplace(qtId, savedIt->second);
|
||||
} else {
|
||||
auto groupPos = findAppGroupPosition(nodeIt->second);
|
||||
QPointF candidate = groupPos.value_or(nextPosition(nodeIt->second));
|
||||
QPointF candidate = nextPosition(nodeIt->second);
|
||||
m_positions.emplace(qtId, findNonOverlappingPosition(candidate, nodeIt->second));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (nodeHasVolume(nodeType)) {
|
||||
auto *volumeWidget = new NodeVolumeWidget();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue