mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-01-04 11:30:52 +01:00
cross ref item: bugfix
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@3035 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -40,7 +40,7 @@ CrossRefItem::CrossRefItem(Element *elmt, QGraphicsItem *parent) :
|
||||
connect(elmt, SIGNAL(positionChange(QPointF)), this, SLOT(autoPos()));
|
||||
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(XRefProperties)), this, SLOT(updateLabel()));
|
||||
connect(elmt->diagram(), SIGNAL(XRefPropertiesChanged(XRefProperties)), this, SLOT(setProperties(XRefProperties)));
|
||||
updateLabel();
|
||||
}
|
||||
|
||||
@@ -52,6 +52,7 @@ CrossRefItem::~CrossRefItem() {
|
||||
disconnect(m_element, SIGNAL(positionChange(QPointF)), 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(XRefProperties)), this, SLOT(setProperties(XRefProperties)));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -70,6 +71,13 @@ QPainterPath CrossRefItem::shape() const{
|
||||
return m_shape_path;
|
||||
}
|
||||
|
||||
void CrossRefItem::setProperties(XRefProperties xrp) {
|
||||
if (m_properties != xrp) {
|
||||
m_properties = xrp;
|
||||
updateLabel();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief CrossRefItem::updateLabel
|
||||
* Update the content of the item
|
||||
|
||||
Reference in New Issue
Block a user