Commit c729d965 authored by Craig Watson's avatar Craig Watson

Library (right panel): fix for elements not disappearing from current path when they are moved

parent 88ef7fdd
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment