Cross ref item : change how some methods work

Master element : minor change related to the change of cross ref item


git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@3539 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2014-12-08 17:39:57 +00:00
parent cfe267fcb3
commit e4c73b8666
3 changed files with 54 additions and 75 deletions

View File

@@ -91,8 +91,8 @@ void MasterElement::unlinkElement(Element *elmt) {
disconnect(elmt, SIGNAL(xChanged()), cri_, SLOT(updateLabel()));
disconnect(elmt, SIGNAL(yChanged()), cri_, SLOT(updateLabel()));
if (aboutDeleteXref()) return;
cri_ -> updateLabel();
aboutDeleteXref();
}
}
@@ -128,6 +128,7 @@ void MasterElement::updateLabel(DiagramContext old_info, DiagramContext new_info
//Delete or update the xref
if (cri_) {
cri_ -> updateLabel();
aboutDeleteXref();
}
else {
@@ -150,11 +151,7 @@ void MasterElement::updateLabel(DiagramContext old_info, DiagramContext new_info
bool MasterElement::aboutDeleteXref() {
if(!cri_) return true;
QString comment = elementInformations()["comment"].toString();
bool must_show = elementInformations().keyMustShow("comment");
//Delete Xref item if there isn't reason to display it
if (linkedElements().isEmpty() && (comment.isEmpty() || !must_show)) {
if (cri_ -> boundingRect().isNull()) {
delete cri_;
cri_ = nullptr;
return true;