mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 20:50:34 +01:00
Fix : clear the element texts when paste an element with the option "Do not store the labels of items in the copy paste" enabled
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5385 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -103,10 +103,12 @@ void PasteDiagramCommand::redo()
|
|||||||
if (settings.value("diagramcommands/erase-label-on-copy", true).toBool())
|
if (settings.value("diagramcommands/erase-label-on-copy", true).toBool())
|
||||||
{
|
{
|
||||||
//Reset the information about the label, the comment and location
|
//Reset the information about the label, the comment and location
|
||||||
e -> rElementInformations().addValue("formula", "");
|
DiagramContext dc = e->elementInformations();
|
||||||
e -> rElementInformations().addValue("label", "");
|
dc.addValue("formula", "");
|
||||||
e -> rElementInformations().addValue("comment", "");
|
dc.addValue("label", "");
|
||||||
e -> rElementInformations().addValue("location", "");
|
dc.addValue("comment", "");
|
||||||
|
dc.addValue("location", "");
|
||||||
|
e->setElementInformations(dc);
|
||||||
|
|
||||||
//Reset the text of conductors
|
//Reset the text of conductors
|
||||||
const QList <Conductor *> conductors_list = content.m_conductors_to_move;
|
const QList <Conductor *> conductors_list = content.m_conductors_to_move;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/*
|
/*
|
||||||
Copyright 2006-2017 The QElectroTech Team
|
Copyright 2006-2017 The QElectroTech Team
|
||||||
This file is part of QElectroTech.
|
This file is part of QElectroTech.
|
||||||
|
|
||||||
@@ -129,7 +129,6 @@ class Element : public QetGraphicsItem
|
|||||||
//METHODS related to information
|
//METHODS related to information
|
||||||
public:
|
public:
|
||||||
DiagramContext elementInformations ()const {return m_element_informations;}
|
DiagramContext elementInformations ()const {return m_element_informations;}
|
||||||
DiagramContext& rElementInformations () {return m_element_informations;}
|
|
||||||
virtual void setElementInformations (DiagramContext dc);
|
virtual void setElementInformations (DiagramContext dc);
|
||||||
DiagramContext kindInformations () const {return m_kind_informations;} //@kind_information_ is used to store more information
|
DiagramContext kindInformations () const {return m_kind_informations;} //@kind_information_ is used to store more information
|
||||||
//about the herited class like contactelement for know
|
//about the herited class like contactelement for know
|
||||||
|
|||||||
Reference in New Issue
Block a user