Change connect nodes behavor.
If hovered target is not editable, create new node instead of connect existed nodes.master
parent
6693365543
commit
fe401a5f13
|
@ -1096,9 +1096,9 @@ bool SkeletonGraphicsWidget::mousePress(QMouseEvent *event)
|
||||||
if (m_addFromNodeItem) {
|
if (m_addFromNodeItem) {
|
||||||
if (m_hoveredNodeItem && m_addFromNodeItem &&
|
if (m_hoveredNodeItem && m_addFromNodeItem &&
|
||||||
m_hoveredNodeItem != m_addFromNodeItem &&
|
m_hoveredNodeItem != m_addFromNodeItem &&
|
||||||
m_hoveredNodeItem->profile() == m_addFromNodeItem->profile()) {
|
m_hoveredNodeItem->profile() == m_addFromNodeItem->profile() &&
|
||||||
if (m_document->findEdgeByNodes(m_addFromNodeItem->id(), m_hoveredNodeItem->id()))
|
!m_document->findEdgeByNodes(m_addFromNodeItem->id(), m_hoveredNodeItem->id()) &&
|
||||||
return true;
|
m_document->isNodeEditable(m_hoveredNodeItem->id())) {
|
||||||
emit addEdge(m_addFromNodeItem->id(), m_hoveredNodeItem->id());
|
emit addEdge(m_addFromNodeItem->id(), m_hoveredNodeItem->id());
|
||||||
emit groupOperationAdded();
|
emit groupOperationAdded();
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue