|
|
|
@ -372,7 +372,7 @@ tUBGEElementNode* UBTGMediaWidget::saveData() |
|
|
|
|
tUBGEElementNode* result = new tUBGEElementNode(); |
|
|
|
|
QString relativePath = mMediaPath; |
|
|
|
|
relativePath = relativePath.replace(UBApplication::boardController->activeDocument()->persistencePath()+"/",""); |
|
|
|
|
result->name = "media"; |
|
|
|
|
result->name = "media"; |
|
|
|
|
result->attributes.insert("title",mpTitle->text()); |
|
|
|
|
result->attributes.insert("relativePath",relativePath); |
|
|
|
|
result->attributes.insert("mediaType",mMediaType); |
|
|
|
@ -499,7 +499,11 @@ void UBTGMediaWidget::mousePressEvent(QMouseEvent *event) |
|
|
|
|
QDrag *drag = new QDrag(this); |
|
|
|
|
QMimeData *mimeData = new QMimeData(); |
|
|
|
|
QList<QUrl> urlList; |
|
|
|
|
#ifdef Q_WS_WIN |
|
|
|
|
urlList << QUrl::fromLocalFile(mMediaPath); |
|
|
|
|
#else |
|
|
|
|
urlList << QUrl(mMediaPath); |
|
|
|
|
#endif |
|
|
|
|
mimeData->setUrls(urlList); |
|
|
|
|
drag->setMimeData(mimeData); |
|
|
|
|
|
|
|
|
|