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

6
Part.h
View File

@@ -9,7 +9,7 @@
class Connector;
class Logic;
class Part : public QGraphicsItem
class Part : protected QGraphicsItem
{
public:
friend class Connector;
@@ -17,6 +17,7 @@ public:
friend class Logic;
friend class AddPart;
friend class RemoveParts;
friend class AddWire;
friend class RemoveWire;
friend class CopyParts;
@@ -45,6 +46,9 @@ public:
PartType::PartType partType();
QPointF getPos() const;
void setPos(QPointF pos);
void addInputs(int amount);
void addOutputs(int amount);