Revision 6c1ac83d
Added by Katja Luther about 7 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/reference/ReferenceDetailElement.java | ||
---|---|---|
610 | 610 |
Integer referencingObjectsCount = CdmStore.getCommonService().getReferencingObjectsCount(getEntity()); |
611 | 611 |
|
612 | 612 |
if (referencingObjectsCount > 1){ |
613 |
if (warnForReferencedObjects == null){ |
|
614 |
warnForReferencedObjects = formFactory.createLabel(formElement, CdmUtils.Nz("The reference is referenced by " + referencingObjectsCount+ " objects, if you change it, it is changed for all these objects")); |
|
615 |
warnForReferencedObjects.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_RED)); |
|
616 |
warnForReferencedObjects.setLayout(LayoutConstants.FILL(2, 2)); |
|
617 |
warnForReferencedObjects.setForeground(Display.getCurrent().getSystemColor( |
|
618 |
SWT.COLOR_RED)); |
|
619 |
|
|
620 |
}else{ |
|
621 |
warnForReferencedObjects.setText(CdmUtils.Nz("The reference is referenced by " + referencingObjectsCount+ " objects, if you change it, it is changed for all these objects")); |
|
622 |
} |
|
623 |
warnForReferencedObjects.setVisible(false); |
|
613 |
warnForReferencedObjects = formFactory.createLabel(formElement, CdmUtils.Nz("The reference is referenced by " + referencingObjectsCount+ " objects, if you change it, it is changed for all these objects")); |
|
614 |
warnForReferencedObjects.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_RED)); |
|
615 |
warnForReferencedObjects.setLayout(LayoutConstants.FILL(2, 3)); |
|
616 |
|
|
617 |
warnForReferencedObjects.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_RED)); |
|
624 | 618 |
} |
625 | 619 |
} |
626 | 620 |
} |
Also available in: Unified diff
fix problem of reference wizard when changing reference type