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:
dfochi
2016-07-13 21:25:29 +00:00
parent 7d3e4e18ce
commit ec67d8c408
6 changed files with 37 additions and 5 deletions

View File

@@ -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);