fixes #6033 Structure Manager Not possible to delete a Text

Fixed the issue and pushed the code for review, please check it.