diff --git a/src/desktop/UBDesktopAnnotationController.cpp b/src/desktop/UBDesktopAnnotationController.cpp index a2a4eac0..70983bab 100644 --- a/src/desktop/UBDesktopAnnotationController.cpp +++ b/src/desktop/UBDesktopAnnotationController.cpp @@ -81,7 +81,7 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent) mTransparentDrawingView->setMouseTracking(true); - mTransparentDrawingView->setAcceptDrops(false); + mTransparentDrawingView->setAcceptDrops(true); QString backgroundStyle = "QWidget {background-color: rgba(127, 127, 127, 0)}"; mTransparentDrawingView->setStyleSheet(backgroundStyle); diff --git a/src/gui/UBLibraryWidget.cpp b/src/gui/UBLibraryWidget.cpp index 31371a83..568b0c4d 100644 --- a/src/gui/UBLibraryWidget.cpp +++ b/src/gui/UBLibraryWidget.cpp @@ -361,15 +361,12 @@ void UBLibraryWidget::dropEvent(QDropEvent *event) QString filePath; QString crntPath = urlList.at(i).toString(); -#ifdef Q_WS_MACX - filePath = QUrl(urlList.at(i)).toString(); -#else if(crntPath.startsWith("file:") || crntPath.startsWith("/")){ filePath = QUrl(crntPath).toLocalFile(); }else{ filePath = crntPath; } -#endif + mLibraryController->importItemOnLibrary(filePath); bDropAccepted = true; }