Fix bug where undoing+redoing AddWire multiple times crashes

This commit is contained in:
xypwn
2020-03-28 11:15:04 +01:00
parent de9e38ddf7
commit 9414c8c426
7 changed files with 28 additions and 7 deletions

View File

@@ -17,6 +17,11 @@ Connector::Connector(Scene* scene, Part *parentPart, ConnectorType::ConnectorTyp
setFlag(QGraphicsItem::ItemSendsScenePositionChanges);
}
Part* Connector::parentPart()
{
return (Part*)parentItem();
}
QRectF Connector::boundingRect() const
{
if(m_connectorType == ConnectorType::Output)