mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-10-02 08:24:14 +02:00
Merge pull request #1188 from ispyisail/fix/1187-pasted-contact-label
Fix #1187: a contact pasted with its coil loses its label
This commit is contained in:
@@ -124,8 +124,11 @@ void PasteDiagramCommand::redo()
|
||||
// function, cross-ref, etc.) in their elementInformations.
|
||||
// Always clear those on paste so the duplicate starts clean,
|
||||
// regardless of the user's erase-label-on-copy preference.
|
||||
// A slave pasted together with its master was relinked to the
|
||||
// master's copy by initLink() above: that data is still right,
|
||||
// and its texts show the master's label, so leave it alone.
|
||||
const bool is_slave = (e->linkType() == Element::Slave);
|
||||
if (is_slave) {
|
||||
if (is_slave && e->isFree()) {
|
||||
DiagramContext dc = e->elementInformations();
|
||||
dc.remove(QETInformation::ELMT_PLC_TYPE);
|
||||
dc.remove(QETInformation::ELMT_PLC_ADDRESS);
|
||||
|
||||
Reference in New Issue
Block a user