mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-23 10:30:53 +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 MasterElement::linkToElement(Element *elmt) {
|
||||
elmt->linkToElement(this);
|
||||
|
||||
if (!cri_) cri_ = new CrossRefItem(this); //create cross ref item if not yet
|
||||
connect(elmt, SIGNAL(positionChange(QPointF)), cri_, SLOT(updateLabel()));
|
||||
connect(elmt, SIGNAL(xChanged()), cri_, SLOT(updateLabel()));
|
||||
connect(elmt, SIGNAL(yChanged()), cri_, SLOT(updateLabel()));
|
||||
cri_->updateLabel();
|
||||
}
|
||||
}
|
||||
@@ -86,7 +87,8 @@ void MasterElement::unlinkElement(Element *elmt) {
|
||||
elmt->unlinkElement(this);
|
||||
|
||||
//update the graphics cross ref
|
||||
disconnect(elmt, SIGNAL(positionChange(QPointF)), cri_, SLOT(updateLabel()));
|
||||
disconnect(elmt, SIGNAL(xChanged()), cri_, SLOT(updateLabel()));
|
||||
disconnect(elmt, SIGNAL(yChanged()), cri_, SLOT(updateLabel()));
|
||||
|
||||
if (linkedElements().isEmpty()) {
|
||||
delete cri_;
|
||||
|
||||
Reference in New Issue
Block a user