From 0c5035d12db10e1b75b9a2ac5898862f189e0d24 Mon Sep 17 00:00:00 2001 From: blacksun Date: Sat, 1 Nov 2014 22:01:59 +0000 Subject: [PATCH] Info about Linked element (cross ref item and info about pos of master for the slave element) is updated when a diagram is removed from project. git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@3429 bfdf4180-ca20-0410-9c96-a3a8aa849046 --- sources/qetgraphicsitem/crossrefitem.cpp | 1 + sources/qetgraphicsitem/slaveelement.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/sources/qetgraphicsitem/crossrefitem.cpp b/sources/qetgraphicsitem/crossrefitem.cpp index a72a2caee..090796061 100644 --- a/sources/qetgraphicsitem/crossrefitem.cpp +++ b/sources/qetgraphicsitem/crossrefitem.cpp @@ -40,6 +40,7 @@ CrossRefItem::CrossRefItem(Element *elmt) : connect(elmt, SIGNAL(elementInfoChange(DiagramContext)), this, SLOT(updateLabel())); connect(elmt -> diagram() -> project(), SIGNAL(projectDiagramsOrderChanged(QETProject*,int,int)), this, SLOT(updateLabel())); + connect(elmt -> diagram() -> project(), SIGNAL(diagramRemoved(QETProject*,Diagram*)), this, SLOT(updateLabel())); connect(elmt -> diagram(), SIGNAL(XRefPropertiesChanged()), this, SLOT(updateProperties())); //set specific behavior related to the parent item. diff --git a/sources/qetgraphicsitem/slaveelement.cpp b/sources/qetgraphicsitem/slaveelement.cpp index 2acb248f1..622c6602f 100644 --- a/sources/qetgraphicsitem/slaveelement.cpp +++ b/sources/qetgraphicsitem/slaveelement.cpp @@ -60,6 +60,7 @@ void SlaveElement::linkToElement(Element *elmt) { connect(elmt, SIGNAL(yChanged()), this, SLOT(updateLabel())); connect(elmt, SIGNAL(elementInfoChange(DiagramContext)), this, SLOT(updateLabel())); connect(diagram()->project(), SIGNAL(projectDiagramsOrderChanged(QETProject*,int,int)), this, SLOT(updateLabel())); + connect(diagram()->project(), SIGNAL(diagramRemoved(QETProject*,Diagram*)), this, SLOT(updateLabel())); updateLabel(); elmt -> linkToElement(this); @@ -93,6 +94,7 @@ void SlaveElement::unlinkElement(Element *elmt) { disconnect(elmt, SIGNAL(yChanged()), this, SLOT(updateLabel())); disconnect(elmt, SIGNAL(elementInfoChange(DiagramContext)), this, SLOT(updateLabel())); disconnect(diagram()->project(), SIGNAL(projectDiagramsOrderChanged(QETProject*,int,int)), this, SLOT(updateLabel())); + disconnect(diagram()->project(), SIGNAL(diagramRemoved(QETProject*,Diagram*)), this, SLOT(updateLabel())); delete Xref_item; Xref_item = NULL;