mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 20:50:34 +01:00
Element editor : a copied/pasted terminal part have a new uuid.
This commit is contained in:
@@ -76,37 +76,6 @@ class DeletePartsCommand : public ElementEditionCommand {
|
||||
QList<QGraphicsItem *> deleted_parts;
|
||||
};
|
||||
|
||||
/**
|
||||
This command pastes primitives when editing an electrical element.
|
||||
*/
|
||||
class PastePartsCommand : public ElementEditionCommand {
|
||||
// constructors, destructor
|
||||
public:
|
||||
PastePartsCommand(ElementView *, const ElementContent &, QUndoCommand * = nullptr);
|
||||
~PastePartsCommand() override;
|
||||
private:
|
||||
PastePartsCommand(const PastePartsCommand &);
|
||||
|
||||
// methods
|
||||
public:
|
||||
void undo() override;
|
||||
void redo() override;
|
||||
virtual void setOffset(int, const QPointF &, int, const QPointF &);
|
||||
|
||||
// attributes
|
||||
private:
|
||||
/// Pasted content
|
||||
ElementContent content_;
|
||||
/// Data required to undo a copy/paste with offset
|
||||
int old_offset_paste_count_;
|
||||
QPointF old_start_top_left_corner_;
|
||||
int new_offset_paste_count_;
|
||||
QPointF new_start_top_left_corner_;
|
||||
bool uses_offset;
|
||||
/// Prevent the first call to redo()
|
||||
bool first_redo;
|
||||
};
|
||||
|
||||
/**
|
||||
This command cut primitives when editing an electrical element.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user