svn commit: r16270 - trunk/src/argouml-app/src/org/argouml/kernel/ProjectImpl.java
Marcos Aurélio <[email protected]>
| Newsgroups | gmane.comp.lang.uml.argouml.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: maurelio1234
Date: 2008-12-07 05:59:06-0800
New Revision: 16270
Modified:
trunk/src/argouml-app/src/org/argouml/kernel/ProjectImpl.java
Log:
fixing issue 5548
ProjectImpl.setProfileConfiguration was removing the old configuration and adding another one even if the new was was the same object as the old one. The problem is that when the instance is removed from the project it is dis-associated from it and there's no way to associate it again.
Modified: trunk/src/argouml-app/src/org/argouml/kernel/ProjectImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/kernel/ProjectImpl.java?view=diff&pathrev=16270&r1=16269&r2=16270
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/kernel/ProjectImpl.java (original)
+++ trunk/src/argouml-app/src/org/argouml/kernel/ProjectImpl.java 2008-12-07 05:59:06-0800
@@ -1065,15 +1065,17 @@
}
public void setProfileConfiguration(ProfileConfiguration pc) {
- if (this.profileConfiguration != null) {
- this.members.remove(this.profileConfiguration);
- }
-
- this.profileConfiguration = pc;
+ if (this.profileConfiguration != pc) {
+ if (this.profileConfiguration != null) {
+ this.members.remove(this.profileConfiguration);
+ }
- // there's just one ProfileConfiguration in a project
- // and there's no other way to add another one
- members.add(pc);
+ this.profileConfiguration = pc;
+
+ // there's just one ProfileConfiguration in a project
+ // and there's no other way to add another one
+ members.add(pc);
+ }
ProfileFacade.applyConfiguration(pc);
}
------------------------------------------------------
http://argouml.tigris.org/ds/viewMessage.do?dsForumId=5905&dsMessageId=980763
To unsubscribe from this discussion, e-mail: [[email protected]].