TreeEditPart treeEditPart = (TreeEditPart) child;
TreeItem treeItem = (TreeItem) treeEditPart.getWidget();
+ deleteAnimatorWidget(treeItem);
+
removeTreeItem(treeItem, "OutlineTreeEditor");
removeTreeItem(treeItem, "RefrenceTreeItem");
removeTreeItem(treeItem, "KeyframeTreeEditor");
Object object = treeItem.getData(data);
if (object != null) {
TreeEditor editor = ((TreeEditor) object);
- Control viewWidget = editor.getEditor();
- viewWidget.dispose();
- editor.dispose();
+ if(editor != null) {
+ Control viewWidget = editor.getEditor();
+ if(viewWidget != null && !(viewWidget.isDisposed())) {
+ viewWidget.dispose();
+ }
+ editor.dispose();
+ }
}
}
TreeItem[] items = tree.getItems();
for (TreeItem item : items) {
TimelineEditPart editPart = (TimelineEditPart) item.getData();
- if (((AnimatorWidget) (editPart.getModel())).getId().equals(currentWidget.getId())) {
- TreeItem[] childItems = item.getItems();
- if (childItems != null && childItems.length > 0) {
- deleteAnimatorWidget(item);
- }
-
removeChild(editPart);
- break;
- }
}
}
if (editPart != null) {
removeTreeItem(item, "OutlineTreeEditor");
removeTreeItem(item, "KeyframeTreeEditor");
-
break;
}
}