mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-31 16:50: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:
@@ -37,14 +37,15 @@ CrossRefItem::CrossRefItem(Element *elmt) :
|
||||
m_element (elmt)
|
||||
{
|
||||
m_properties = elmt->diagram()->defaultXRefProperties(elmt->kindInformations()["type"].toString());
|
||||
connect(elmt, SIGNAL(elementInfoChange(DiagramContext)), this, SLOT(updateLabel()));
|
||||
connect(elmt->diagram()->project(), SIGNAL(projectDiagramsOrderChanged(QETProject*,int,int)), this, SLOT(updateLabel()));
|
||||
connect(elmt->diagram(), SIGNAL(XRefPropertiesChanged()), this, SLOT(updateProperties()));
|
||||
|
||||
connect(elmt, SIGNAL(elementInfoChange(DiagramContext)), this, SLOT(updateLabel()));
|
||||
connect(elmt -> diagram() -> project(), SIGNAL(projectDiagramsOrderChanged(QETProject*,int,int)), this, SLOT(updateLabel()));
|
||||
connect(elmt -> diagram(), SIGNAL(XRefPropertiesChanged()), this, SLOT(updateProperties()));
|
||||
|
||||
//set specific behavior related to the parent item.
|
||||
if(m_properties.snapTo() == XRefProperties::Bottom) {
|
||||
connect(elmt, SIGNAL(positionChange(QPointF)), this, SLOT(autoPos()));
|
||||
connect(elmt, SIGNAL(rotationChanged()), this, SLOT(autoPos()));
|
||||
connect(elmt, SIGNAL(yChanged()), this, SLOT(autoPos()));
|
||||
connect(elmt, SIGNAL(rotationChanged()), this, SLOT(autoPos()));
|
||||
} else {
|
||||
setTextParent();
|
||||
}
|
||||
@@ -57,12 +58,12 @@ CrossRefItem::CrossRefItem(Element *elmt) :
|
||||
*/
|
||||
CrossRefItem::~CrossRefItem() {
|
||||
if(m_properties.snapTo() == XRefProperties::Bottom) {
|
||||
disconnect(m_element, SIGNAL(positionChange(QPointF)), this, SLOT(autoPos()));
|
||||
disconnect(m_element, SIGNAL(rotationChanged()), this, SLOT(autoPos()));
|
||||
disconnect(m_element, SIGNAL(yChanged()), this, SLOT(autoPos()));
|
||||
disconnect(m_element, SIGNAL(rotationChanged()), this, SLOT(autoPos()));
|
||||
}
|
||||
disconnect(m_element, SIGNAL(elementInfoChange(DiagramContext)), this, SLOT(updateLabel()));
|
||||
disconnect(m_element->diagram()->project(), SIGNAL(projectDiagramsOrderChanged(QETProject*,int,int)), this, SLOT(updateLabel()));
|
||||
disconnect(m_element->diagram(), SIGNAL(XRefPropertiesChanged()), this, SLOT(updateProperties()));
|
||||
disconnect(m_element, SIGNAL(elementInfoChange(DiagramContext)), this, SLOT(updateLabel()));
|
||||
disconnect(m_element -> diagram() -> project(), SIGNAL(projectDiagramsOrderChanged(QETProject*,int,int)), this, SLOT(updateLabel()));
|
||||
disconnect(m_element -> diagram(), SIGNAL(XRefPropertiesChanged()), this, SLOT(updateProperties()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user