|
|
|
@ -1224,7 +1224,7 @@ bool UBFeaturesModel::dropMimeData(const QMimeData *mimeData, Qt::DropAction act |
|
|
|
|
UBFeature sourceElement; |
|
|
|
|
if (dataFromSameModel) { |
|
|
|
|
sourceElement = featList.at(i); |
|
|
|
|
moveData(sourceElement, parentFeature, Qt::MoveAction); |
|
|
|
|
moveData(sourceElement, parentFeature, Qt::MoveAction, true); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} else if (mimeData->hasUrls()) { |
|
|
|
@ -1323,6 +1323,11 @@ void UBFeaturesModel::moveData(const UBFeature &source, const UBFeature &destina |
|
|
|
|
UBFeatureElementType sourceType = source.getType(); |
|
|
|
|
QImage sourceIcon = source.getThumbnail(); |
|
|
|
|
|
|
|
|
|
if (sourceType == FEATURE_INTERNAL) { |
|
|
|
|
qWarning() << "Built-in tools cannot be moved"; |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Q_ASSERT( QFileInfo( sourcePath ).exists() ); |
|
|
|
|
|
|
|
|
|
QString name = QFileInfo( sourcePath ).fileName(); |
|
|
|
|