svn commit: r19621 - trunk/src/argouml-app/src/org/argouml/ui/explorer/ExplorerPopup.java
[email protected] Sat, 30 Jul 2011 08:09:16 -0700 (PDT)
| Newsgroups | gmane.comp.lang.uml.argouml.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: bobtarling
Date: 2011-07-30 08:09:15-0700
New Revision: 19621
Modified:
trunk/src/argouml-app/src/org/argouml/ui/explorer/ExplorerPopup.java
Log:
Applying patch supplied by Laurent to allow delete of multiple diagrams
Modified: trunk/src/argouml-app/src/org/argouml/ui/explorer/ExplorerPopup.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/ui/explorer/ExplorerPopup.java?view=diff&pathrev=19621&r1=19620&r2=19621
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/ui/explorer/ExplorerPopup.java (original)
+++ trunk/src/argouml-app/src/org/argouml/ui/explorer/ExplorerPopup.java 2011-07-30 08:09:15-0700
@@ -9,6 +9,7 @@
* Contributors:
* Bob Tarling
* Michiel van der Wulp
+ * Laurent Braud
*****************************************************************************
*
* Some portions of this file was previously release using the BSD License:
@@ -317,6 +318,25 @@
classifiers);
this.add(action);
}
+ // Determine if only diagrams are in the target list.
+ boolean haveAtLeastOneDiagram = false;
+ boolean onlyDiagram = true;
+ for (Object element : TargetManager.getInstance().getTargets()) {
+ if (element instanceof Diagram) {
+ haveAtLeastOneDiagram = true;
+ } else {
+ onlyDiagram = false;
+ }
+ }
+ onlyDiagram = onlyDiagram && haveAtLeastOneDiagram;
+
+ if (onlyDiagram) {
+ ActionDeleteModelElements ad = new ActionDeleteModelElements();
+ ad.setEnabled(ad.shouldBeEnabled());
+ this.add(ad);
+ }
+
+
} else if (selectedItem instanceof Diagram) {
this.add(new ActionSaveDiagramToClipboard());
// TODO: Delete should be available on any combination of model
------------------------------------------------------
http://argouml.tigris.org/ds/viewMessage.do?dsForumId=5905&dsMessageId=2806705
To unsubscribe from this discussion, e-mail: [[email protected]].