2020-03-24 20:18:39 +01:00
|
|
|
#include "RemoveWire.h"
|
|
|
|
|
|
|
|
#include "../Scene.h"
|
|
|
|
#include "../Logic.h"
|
|
|
|
#include "../Wire.h"
|
|
|
|
#include "../Part.h"
|
2020-03-29 18:25:08 +02:00
|
|
|
#include "../Connector.h"\
|
2020-03-24 20:18:39 +01:00
|
|
|
|
|
|
|
RemoveWire::RemoveWire(Scene* scene, Wire* wire)
|
|
|
|
:m_scene(scene), m_wire(wire)
|
|
|
|
{
|
|
|
|
setText("Remove Wire");
|
|
|
|
}
|
|
|
|
|
|
|
|
RemoveWire::~RemoveWire()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void RemoveWire::redo()
|
|
|
|
{
|
2020-03-29 18:25:08 +02:00
|
|
|
m_scene->stopTrackingWire(m_wire);
|
2020-03-24 20:18:39 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void RemoveWire::undo()
|
|
|
|
{
|
2020-03-29 18:25:08 +02:00
|
|
|
m_scene->startTrackingWire(m_wire);
|
2020-03-24 20:18:39 +01:00
|
|
|
}
|