From: Patric Plitzner
Date: Tue, 5 Aug 2014 11:46:59 +0000 (+0000)
Subject: - fixed bug that showed double or no '&' (#4302)
X-Git-Tag: 3.6.0~516
X-Git-Url: https://dev.e-taxonomy.eu/gitweb/taxeditor.git/commitdiff_plain/b79e447b11aae47607af757deac046638d270288
- fixed bug that showed double or no '&' (#4302)
---
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/AuthorshipDetailSection.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/AuthorshipDetailSection.java
index 66c071ced..44aa27745 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/AuthorshipDetailSection.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/AuthorshipDetailSection.java
@@ -56,7 +56,12 @@ public class AuthorshipDetailSection extends AbstractCdmDetailSection
return formFactory.createTaxonBaseDetailElement(parentElement, style);
}
+ /* (non-Javadoc)
+ * @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection#setSectionTitle()
+ */
+ @Override
+ protected void setSectionTitle() {
+ super.setSectionTitle();
+ String title = getText();
+ // we have to duplicate ampersands otherwise they are treated as
+ // mnenomic (see Label.setText() documentation)
+ // see also #4302
+ title = title.replace("&", "&&");
+ setText(title);
+ }
+
}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/EntitySelectionElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/EntitySelectionElement.java
index 388827b12..b6e5ca65e 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/EntitySelectionElement.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/EntitySelectionElement.java
@@ -288,9 +288,6 @@ public class EntitySelectionElement extends
*/
protected void updateElement() {
String title = CdmUtils.Nz(getTitle());
- // we have to duplicate ampersands otherwise they are treated as
- // mnenomic (see Label.setText() documentation)
- title = title.replace("&", "&&");
text.setText(title); // title can be null
if (isEditable) {
updateButtonStates();