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