mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 18:55:01 +02:00
Fix issue with .svo's not loading when the url has parameters
This commit is contained in:
parent
edaee9716b
commit
2a84d9a6ab
2 changed files with 5 additions and 4 deletions
|
@ -889,7 +889,7 @@ bool Application::event(QEvent* event) {
|
|||
if (!url.isEmpty()) {
|
||||
if (url.scheme() == HIFI_URL_SCHEME) {
|
||||
DependencyManager::get<AddressManager>()->handleLookupString(fileEvent->url().toString());
|
||||
} else if (url.url().toLower().endsWith(SVO_EXTENSION)) {
|
||||
} else if (url.path().toLower().endsWith(SVO_EXTENSION)) {
|
||||
emit svoImportRequested(url.url());
|
||||
}
|
||||
}
|
||||
|
@ -1455,10 +1455,11 @@ void Application::dropEvent(QDropEvent *event) {
|
|||
QString snapshotPath;
|
||||
const QMimeData *mimeData = event->mimeData();
|
||||
foreach (QUrl url, mimeData->urls()) {
|
||||
if (url.url().toLower().endsWith(SNAPSHOT_EXTENSION)) {
|
||||
auto lower = url.path().toLower();
|
||||
if (lower.endsWith(SNAPSHOT_EXTENSION)) {
|
||||
snapshotPath = url.toLocalFile();
|
||||
break;
|
||||
} else if (url.url().toLower().endsWith(SVO_EXTENSION)) {
|
||||
} else if (lower.endsWith(SVO_EXTENSION)) {
|
||||
emit svoImportRequested(url.url());
|
||||
event->acceptProposedAction();
|
||||
return;
|
||||
|
|
|
@ -170,7 +170,7 @@ void GLCanvas::wheelEvent(QWheelEvent* event) {
|
|||
void GLCanvas::dragEnterEvent(QDragEnterEvent* event) {
|
||||
const QMimeData *mimeData = event->mimeData();
|
||||
foreach (QUrl url, mimeData->urls()) {
|
||||
auto lower = url.url().toLower();
|
||||
auto lower = url.path().toLower();
|
||||
if (lower.endsWith(SNAPSHOT_EXTENSION) || lower.endsWith(SVO_EXTENSION)) {
|
||||
event->acceptProposedAction();
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue