mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 20:50:34 +01:00
Minor: %prefix is not hardcoded anymore. Zoom in and out with Ctrl + and Ctrl -
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4574 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -34,6 +34,7 @@ SlaveElement::SlaveElement(const ElementsLocation &location, QGraphicsItem *qgi,
|
||||
{
|
||||
Xref_item = nullptr;
|
||||
link_type_ = Slave;
|
||||
connect(this, SIGNAL(updateLabel()), this, SLOT(updateLabel()));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -56,6 +57,7 @@ void SlaveElement::linkToElement(Element *elmt)
|
||||
if (elmt->linkType() == Master && !connected_elements.contains(elmt))
|
||||
{
|
||||
if(!isFree()) unlinkAllElements();
|
||||
this->disconnect();
|
||||
connected_elements << elmt;
|
||||
|
||||
connect(elmt, SIGNAL(xChanged()), this, SLOT(updateLabel()));
|
||||
@@ -125,7 +127,7 @@ void SlaveElement::unlinkElement(Element *elmt)
|
||||
*/
|
||||
void SlaveElement::updateLabel() {
|
||||
|
||||
QString label("_");
|
||||
QString label = this->taggedText("label")->toPlainText();
|
||||
QString Xreflabel;
|
||||
bool no_editable = false;
|
||||
|
||||
@@ -139,6 +141,7 @@ void SlaveElement::updateLabel() {
|
||||
Xreflabel = assignVariables(Xreflabel, elmt);
|
||||
label = assignVariables(label, elmt);
|
||||
}
|
||||
else label = assignVariables(label, this);
|
||||
|
||||
// set the new label
|
||||
ElementTextItem *eti = setTaggedText("label", label, no_editable);
|
||||
|
||||
Reference in New Issue
Block a user