mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
do not allow drag for renderers that do not support it
This commit is contained in:
+6
-1
@@ -177,7 +177,12 @@ class EditorGutterComponentImpl extends EditorGutterComponentEx implements Mouse
|
||||
@Override
|
||||
public DnDDragStartBean fun(DnDActionInfo info) {
|
||||
final GutterMark renderer = getGutterRenderer(info.getPoint());
|
||||
return renderer != null && (info.isCopy() || info.isMove()) ? new DnDDragStartBean(renderer) : null;
|
||||
if (renderer instanceof GutterIconRenderer &&
|
||||
((GutterIconRenderer)renderer).getDraggableObject() != null &&
|
||||
(info.isCopy() || info.isMove())) {
|
||||
return new DnDDragStartBean(renderer);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
})
|
||||
.setDropHandler(new DnDDropHandler() {
|
||||
|
||||
Reference in New Issue
Block a user