+ FEM: Improve drag and drop for FEM analysis object
This commit is contained in:
@@ -390,6 +390,9 @@ QMimeData * TreeWidget::mimeData (const QList<QTreeWidgetItem *> items) const
|
||||
if (!vp->canDragObjects()) {
|
||||
return 0;
|
||||
}
|
||||
else if (!vp->canDragObject(obj)) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -479,6 +482,12 @@ void TreeWidget::dragMoveEvent(QDragMoveEvent *event)
|
||||
event->ignore();
|
||||
return;
|
||||
}
|
||||
|
||||
// let the view provider decide to accept the object or ignore it
|
||||
if (!vp->canDropObject(obj)) {
|
||||
event->ignore();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user