Skip to content

Commit

Permalink
Fixed #3604. Send the name change request into the depths recursively.
Browse files Browse the repository at this point in the history
  • Loading branch information
adeas31 committed Jan 25, 2016
1 parent 86010c6 commit e1abbec
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
14 changes: 13 additions & 1 deletion OMEdit/OMEditGUI/Component/Component.cpp
Expand Up @@ -1666,10 +1666,22 @@ void Component::componentNameHasChanged()
} else {
setToolTip(tr("<b>%1</b> %2").arg(mpComponentInfo->getClassName()).arg(mpComponentInfo->getName()));
}
emit displayTextChanged();
displayTextChangedRecursive();
update();
}

/*!
* \brief Component::displayTextChangedRecursive
* Notifies all the TextAnnotation's about the name change.
*/
void Component::displayTextChangedRecursive()
{
emit displayTextChanged();
foreach (Component *pInheritedComponent, mInheritedComponentsList) {
pInheritedComponent->displayTextChangedRecursive();
}
}

/*!
* \brief Component::deleteMe
* Deletes the Component from the current view.
Expand Down
1 change: 1 addition & 0 deletions OMEdit/OMEditGUI/Component/Component.h
Expand Up @@ -284,6 +284,7 @@ public slots:
void finishResizeComponent();
void resizedComponent();
void componentNameHasChanged();
void displayTextChangedRecursive();
void deleteMe();
void duplicate();
void rotateClockwise();
Expand Down

0 comments on commit e1abbec

Please sign in to comment.