Element : edit an element text item (with tagg) directly on the folio, also update the information of the element.

For exemple, edit the element text item tagged "label", update the value with key "label" of element information. 


git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4804 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2016-12-08 16:54:41 +00:00
parent 9f014d55af
commit ae2afe8424
5 changed files with 72 additions and 102 deletions

View File

@@ -1011,14 +1011,6 @@ void Diagram::addItem(QGraphicsItem *item)
switch (item->type())
{
case Element::Type:
{
Element *elmt = static_cast<Element*>(item);
foreach(ElementTextItem *eti, elmt->texts())
connect (eti, &ElementTextItem::diagramTextChanged, this, &Diagram::diagramTextChanged);
}
break;
case Conductor::Type:
{
Conductor *conductor = static_cast<Conductor *>(item);
@@ -1048,15 +1040,6 @@ void Diagram::removeItem(QGraphicsItem *item)
switch (item->type())
{
case Element::Type:
{
Element *elmt = static_cast<Element *>(item);
elmt->unlinkAllElements();
foreach(ElementTextItem *text, elmt->texts())
disconnect(text, &ElementTextItem::diagramTextChanged, this, &Diagram::diagramTextChanged);
}
break;
case Conductor::Type:
{
Conductor *conductor = static_cast<Conductor *>(item);