mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 15:29:32 +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.isEmpty()) {
|
||||||
if (url.scheme() == HIFI_URL_SCHEME) {
|
if (url.scheme() == HIFI_URL_SCHEME) {
|
||||||
DependencyManager::get<AddressManager>()->handleLookupString(fileEvent->url().toString());
|
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());
|
emit svoImportRequested(url.url());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1455,10 +1455,11 @@ void Application::dropEvent(QDropEvent *event) {
|
||||||
QString snapshotPath;
|
QString snapshotPath;
|
||||||
const QMimeData *mimeData = event->mimeData();
|
const QMimeData *mimeData = event->mimeData();
|
||||||
foreach (QUrl url, mimeData->urls()) {
|
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();
|
snapshotPath = url.toLocalFile();
|
||||||
break;
|
break;
|
||||||
} else if (url.url().toLower().endsWith(SVO_EXTENSION)) {
|
} else if (lower.endsWith(SVO_EXTENSION)) {
|
||||||
emit svoImportRequested(url.url());
|
emit svoImportRequested(url.url());
|
||||||
event->acceptProposedAction();
|
event->acceptProposedAction();
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -170,7 +170,7 @@ void GLCanvas::wheelEvent(QWheelEvent* event) {
|
||||||
void GLCanvas::dragEnterEvent(QDragEnterEvent* event) {
|
void GLCanvas::dragEnterEvent(QDragEnterEvent* event) {
|
||||||
const QMimeData *mimeData = event->mimeData();
|
const QMimeData *mimeData = event->mimeData();
|
||||||
foreach (QUrl url, mimeData->urls()) {
|
foreach (QUrl url, mimeData->urls()) {
|
||||||
auto lower = url.url().toLower();
|
auto lower = url.path().toLower();
|
||||||
if (lower.endsWith(SNAPSHOT_EXTENSION) || lower.endsWith(SVO_EXTENSION)) {
|
if (lower.endsWith(SNAPSHOT_EXTENSION) || lower.endsWith(SVO_EXTENSION)) {
|
||||||
event->acceptProposedAction();
|
event->acceptProposedAction();
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue