Revision 8b6a0f21
Added by Patrick Plitzner almost 9 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/media/MediaViewPart.java | ||
---|---|---|
104 | 104 |
} |
105 | 105 |
|
106 | 106 |
if(part instanceof IPartContentHasMedia && ((IPartContentHasMedia) part).canAttachMedia()){ |
107 |
if(selection instanceof IStructuredSelection |
|
108 |
&& ((IStructuredSelection) selection).getFirstElement() instanceof IDescribable<?>){ |
|
107 |
if(selection instanceof IStructuredSelection){ |
|
109 | 108 |
Object firstElement = ((IStructuredSelection) selection).getFirstElement(); |
110 | 109 |
if(firstElement instanceof TreeNode){ |
111 | 110 |
showViewer(part, new StructuredSelection(((TreeNode) firstElement).getValue())); |
112 | 111 |
return; |
113 | 112 |
} |
114 |
else if(firstElement!=null){ |
|
113 |
else if(firstElement!=null |
|
114 |
&& firstElement instanceof IDescribable<?>){ |
|
115 | 115 |
showViewer(part, (IStructuredSelection) selection); |
116 | 116 |
return; |
117 | 117 |
} |
Also available in: Unified diff
Fix media view selection