mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 20:50:34 +01:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user