mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 12:40:35 +01:00
Replace AddItemCommand class by AddGraphicsObjectCommand
The class is the same except the name and the use of QPointer to avoid segfault with deleted QGraphicsObject.
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
|
||||
#include "../conductorautonumerotation.h"
|
||||
#include "../diagram.h"
|
||||
#include "../diagramcommands.h"
|
||||
#include "../undocommand/addgraphicsobjectcommand.h"
|
||||
#include "../qetgraphicsitem/conductor.h"
|
||||
#include "../qetgraphicsitem/element.h"
|
||||
#include "../qetgraphicsitem/terminal.h"
|
||||
@@ -58,7 +58,7 @@ ConductorCreator::ConductorCreator(Diagram *d, QList<Terminal *> terminals_list)
|
||||
Conductor *cond = new Conductor(hub_terminal, t);
|
||||
cond->setProperties(m_properties);
|
||||
cond->setSequenceNum(m_sequential_number);
|
||||
d->undoStack().push(new AddItemCommand<Conductor *>(cond, d));
|
||||
d->undoStack().push(new AddGraphicsObjectCommand(cond, d));
|
||||
|
||||
c_list.append(cond);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user