master
Denes Matetelki 14 years ago
parent d84063fac6
commit 11e8fa36d0

@ -347,8 +347,6 @@ void GraphWidget::removeNode()
void GraphWidget::editNode() void GraphWidget::editNode()
{ {
qDebug() << __PRETTY_FUNCTION__;
if (!m_activeNode) if (!m_activeNode)
{ {
m_parent->statusBarMsg(tr("No active node.")); m_parent->statusBarMsg(tr("No active node."));
@ -494,29 +492,37 @@ void GraphWidget::removeEdge()
void GraphWidget::nodeLostFocus() void GraphWidget::nodeLostFocus()
{ {
qDebug() << __PRETTY_FUNCTION__;
if (m_editingNode) if (m_editingNode)
{ {
m_editingNode = false; m_editingNode = false;
if (m_activeNode)
{
m_activeNode->setEditable(false); m_activeNode->setEditable(false);
m_activeNode->update(); m_activeNode->update();
} }
else if (m_edgeAdding) return;
}
if (m_edgeAdding)
{ {
m_edgeAdding = false; m_edgeAdding = false;
m_parent->statusBarMsg(tr("Edge adding cancelled.")); m_parent->statusBarMsg(tr("Edge adding cancelled."));
return;
} }
else if (m_edgeDeleting)
if (m_edgeDeleting)
{ {
m_edgeDeleting = false; m_edgeDeleting = false;
m_parent->statusBarMsg(tr("Edge deleting cancelled.")); m_parent->statusBarMsg(tr("Edge deleting cancelled."));
return;
} }
else if(m_showingNodeNumbers)
if(m_showingNodeNumbers)
{ {
m_hintNumber.clear(); m_hintNumber.clear();
showingAllNodeNumbers(false); showingAllNodeNumbers(false);
m_showingNodeNumbers = false; m_showingNodeNumbers = false;
return;
} }
} }

Loading…
Cancel
Save