Showing the changes to interface/src/Menu.cpp (1 of 4 files). Show all
Unified · Split
| @@ -907,7 +907,12 @@ void Menu::goTo() { · 906 unmodified lines | |||
| 907 | if (desiredDestination.startsWith(CUSTOM_URL_SCHEME + "//")) { | 907 | if (desiredDestination.startsWith(CUSTOM_URL_SCHEME + "//")) { |
| 908 | QStringList urlParts = desiredDestination.remove(0, CUSTOM_URL_SCHEME.length() + 2).split('/', QString::SkipEmptyParts); | 908 | QStringList urlParts = desiredDestination.remove(0, CUSTOM_URL_SCHEME.length() + 2).split('/', QString::SkipEmptyParts); |
| 909 | 909 | ||
| 910 | if (urlParts.count() > 1) { | 910 | if (urlParts.count() == 1) { |
| 911 | // location coordinates or place name | ||
| 912 | QString domain = urlParts[0]; | ||
| 913 | goToDomain(domain); | ||
| 914 | } | ||
| 915 | else if (urlParts.count() > 1) { | ||
| 911 | // if url has 2 or more parts, the first one is domain name | 916 | // if url has 2 or more parts, the first one is domain name |
| 912 | QString domain = urlParts[0]; | 917 | QString domain = urlParts[0]; |
| 913 | 918 | ||
| @@ -928,12 +933,7 @@ void Menu::goTo() { · 14 unmodified lines | |||
| 928 | // location orientation | 933 | // location orientation |
| 929 | goToOrientation(orientation); | 934 | goToOrientation(orientation); |
| 930 | } | 935 | } |
| 931 | } else if (urlParts.count() == 1) { | ||
| 932 | // location coordinates or place name | ||
| 933 | QString destination = urlParts[0]; | ||
| 934 | goTo(destination); | ||
| 935 | } | 936 | } |
| 936 | |||
| 937 | } else { | 937 | } else { |
| 938 | goToUser(gotoDialog.textValue()); | 938 | goToUser(gotoDialog.textValue()); |
| 939 | } | 939 | } |