mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-20 08:10:52 +01:00
Improve signal of position changed, between linked elements
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@3394 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -56,7 +56,8 @@ void SlaveElement::linkToElement(Element *elmt) {
|
||||
if(!isFree()) unlinkAllElements();
|
||||
connected_elements << elmt;
|
||||
updateLabel();
|
||||
connect(elmt, SIGNAL(positionChange(QPointF)), this, SLOT(updateLabel()));
|
||||
connect(elmt, SIGNAL(xChanged()), this, SLOT(updateLabel()));
|
||||
connect(elmt, SIGNAL(yChanged()), this, SLOT(updateLabel()));
|
||||
connect(elmt, SIGNAL(elementInfoChange(DiagramContext)), this, SLOT(updateLabel()));
|
||||
elmt->linkToElement(this);
|
||||
}
|
||||
@@ -84,7 +85,8 @@ void SlaveElement::unlinkElement(Element *elmt) {
|
||||
//Ensure elmt is linked to this element
|
||||
if (connected_elements.contains(elmt)) {
|
||||
connected_elements.removeOne(elmt);
|
||||
disconnect(elmt, SIGNAL(positionChange(QPointF)), this, SLOT(updateLabel()));
|
||||
disconnect(elmt, SIGNAL(xChanged()), this, SLOT(updateLabel()));
|
||||
disconnect(elmt, SIGNAL(yChanged()), this, SLOT(updateLabel()));
|
||||
disconnect(elmt, SIGNAL(elementInfoChange(DiagramContext)), this, SLOT(updateLabel()));
|
||||
delete Xref_item; Xref_item = NULL;
|
||||
updateLabel();
|
||||
|
||||
Reference in New Issue
Block a user