svn commit: r15428 - trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigEdgeModelElement.java
| Newsgroups | gmane.comp.lang.uml.argouml.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: bobtarling
Date: 2008-07-31 10:23:31-0700
New Revision: 15428
Modified:
trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigEdgeModelElement.java
Log:
Issue 5267: Don't show bounds of editable text if we can't edit
Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigEdgeModelElement.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigEdgeModelElement.java?view=diff&rev=15428&p1=trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigEdgeModelElement.java&p2=trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigEdgeModelElement.java&r1=15427&r2=15428
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigEdgeModelElement.java (original)
+++ trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/FigEdgeModelElement.java 2008-07-31 10:23:31-0700
@@ -279,9 +279,7 @@
popUpActions.add(new ActionDeleteModelElements());
popupAddOffset++;
- /* Check if multiple items are selected: */
- boolean ms = TargetManager.getInstance().getTargets().size() > 1;
- if (!ms) {
+ if (TargetManager.getInstance().getTargets().size() == 1) {
ToDoList list = Designer.theDesigner().getToDoList();
List<ToDoItem> items = list.elementListForOffender(getOwner());
if (items != null && items.size() > 0) {
@@ -380,11 +378,16 @@
}
/**
+ * This is used to draw a box round the edge of any editable FigText
+ * annotations of the edge when the edge is selected.
+ * TODO: This logic probably belongs in our base selection class
+ * SelectionEdgeClarifiers and could be written to discover what FigText
+ * annotations exist rather than hard code in subclasses.
* @param f the fig to indicate the bounds of
* @param g the graphics
*/
protected void indicateBounds(FigText f, Graphics g) {
- if (f == null) {
+ if (f == null || isReadOnly()) {
return;
}
String text = f.getText();