| Summary: | [Class Diagram] Model element may be lost during a move in the ModelExplorer | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Modeling] Papyrus | Reporter: | Yann Tanguy <yann.tanguy> | ||||
| Component: | Core | Assignee: | Patrick Tessier <Patrick.Tessier> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | critical | ||||||
| Priority: | P3 | ||||||
| Version: | unspecified | ||||||
| Target Milestone: | 0.7.0 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows 7 | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Yann Tanguy
Created attachment 182712 [details]
Moving nested Class
Doing this move action the moved nested Class disappear from model.
fixed in the revision 3382
The bug was due about the target of the drop and dropped element was the same.
So it was removed from the list for the set command
To prevent this bug a test has been added as follow:
if(!newElement.equals(objectLocation)){
tmp.remove(newElement);
//normally tmp.indexOf(objectLocation)!= -1
//if this the case objectlocation=new element and
//it has been removed
int indexObject=tmp.indexOf(objectLocation);
if( before&& indexObject!=-1){
tmp.add(tmp.indexOf(objectLocation), newElement);
}
else if( !before&& indexObject!=-1){
tmp.add(tmp.indexOf(objectLocation)+1, newElement);
}
}
|