Permalink
Browse files

Fix a bug where drag and dropping a folder in the model tree could or…

…phan diagram elements

* The logic in TreeModelViewerDragDropHandler was wrong
* If you dragged and dropped onto its existing parent folder it got added to the elements child list
* This caused the folder to be saved as an element not a folder type
* If this happened to a sub-folder in Views and you then deleted any elements from the model tree they would be orphaned in the View
  • Loading branch information...
Phillipus committed Nov 18, 2013
1 parent 93c91bc commit 27e7d6c60d26c7bec964a0061e0b0aed84528cbe
@@ -1,14 +1,16 @@
Archi Changes
-------------
Version 2.4.1 November 17 2013
Version 2.4.1 November 18 2013
------------------------------
+ A Visualiser diagram can now be exported as an image to file, or copied to the clipboard
+ Colours Preferences - can now Import/Export user-defined fill colour schemes
+ Colours Preferences - Added an option to show user-defined fill colours in the model tree, palette and elsewhere
+ Colours Preferences - Can reset an individual fill colour to its default value by holding Ctrl/Command key when clicking on colour button
+ The Java version shipped with the Windows installer is now version 1.7.0_45
+ New Innno Setup Installer for Windows version
* Fixed a bug where drag and dropping a folder in the model tree could orphan diagram elements
* Fixed connection label not located properly when in parent figure (fix by Jaiguru)
* Relationship rules changed:
Application Interface -> Business Service: "iou" (was "ou")
Node -> Node: "acfgostu" (was "cfgostu")
@@ -19,7 +21,6 @@ Version 2.4.1 November 17 2013
Device -> Device: "acfgostu" (was "cfgostu")
Device -> Network: "aiou" (was "o")
Device -> CommunicationPath: "aioru" (was "o")
* Fix connection label not located properly when in parent figure (fix by Jaiguru)
@@ -224,11 +224,15 @@ public String getLabel() {
IStructuredSelection selection = (IStructuredSelection)LocalSelectionTransfer.getTransfer().getSelection();
for(Object object : selection.toArray()) {
if(object instanceof IFolder && !newParent.getFolders().contains(object)) {
compoundCommand.add(new MoveFolderCommand(newParent, (IFolder)object));
if(object instanceof IFolder) { // This first - folders go in folders
if(!newParent.getFolders().contains(object)) {
compoundCommand.add(new MoveFolderCommand(newParent, (IFolder)object));
}
}
else if(object instanceof INameable && !newParent.getElements().contains(object)) {
compoundCommand.add(new MoveObjectCommand(newParent, (INameable)object));
else if(object instanceof INameable) {
if(!newParent.getElements().contains(object)) {
compoundCommand.add(new MoveObjectCommand(newParent, (INameable)object));
}
}
}
Binary file not shown.
Binary file not shown.

0 comments on commit 27e7d6c

Please sign in to comment.