1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-02-22 02:20:47 +01:00

Compare commits

..

No commits in common. "73e7a1dbf4ac053e29d20ccb19b37c3b943a3ad6" and "213ab73ceb8c05c45a891570fbc853db60283177" have entirely different histories.

3 changed files with 10 additions and 22 deletions

View File

@ -112,6 +112,5 @@
<mimetype>application/vnd.iho.s57-catalogue</mimetype>
<mimetype>application/vnd.gpsdump.wpt</mimetype>
<mimetype>application/vnd.gpstuner.gmi</mimetype>
<mimetype>x-scheme-handler/geo</mimetype>
</mimetypes>
</component>

View File

@ -11,7 +11,7 @@ Comment[ru]=Программа для просмотра и анализа GPS
Comment[sv]=GPS-loggfilsläsare och analysator
Comment[tr]=GPS günlük dosyası görüntüleyici ve analizcisi
Comment[uk]=Переглядач та аналізатор GPS логів
Exec=gpxsee %U
Exec=gpxsee %F
Icon=gpxsee
Terminal=false
Type=Application

View File

@ -1069,8 +1069,6 @@ void GUI::openDir()
bool GUI::openFile(const QString &fileName, bool tryUnknown, int &showError)
{
QString path;
QUrl url(fileName);
if (url.scheme() == "geo") {
if (loadURL(url, showError)) {
@ -1079,23 +1077,20 @@ bool GUI::openFile(const QString &fileName, bool tryUnknown, int &showError)
return true;
} else if (showError)
return false;
} else if (url.isLocalFile())
path = url.toLocalFile();
else
path = fileName;
}
QFileInfo fi(path);
QString canonicalPath(fi.canonicalFilePath());
QFileInfo fi(fileName);
QString canonicalFileName(fi.canonicalFilePath());
if (_files.contains(canonicalPath))
if (_files.contains(canonicalFileName))
return true;
if (!loadFile(path, tryUnknown, showError))
if (!loadFile(fileName, tryUnknown, showError))
return false;
_files.append(canonicalPath);
_files.append(canonicalFileName);
#ifndef Q_OS_ANDROID
_browser->setCurrent(path);
_browser->setCurrent(fileName);
#endif // Q_OS_ANDROID
_fileActionGroup->setEnabled(true);
// Explicitly enable the reload action as it may be disabled by loadMapDir()
@ -1108,7 +1103,7 @@ bool GUI::openFile(const QString &fileName, bool tryUnknown, int &showError)
if (_files.count() > 1)
_mapView->showExtendedInfo(true);
#ifndef Q_OS_ANDROID
updateRecentFiles(canonicalPath);
updateRecentFiles(canonicalFileName);
#endif // Q_OS_ANDROID
return true;
@ -1895,13 +1890,7 @@ bool GUI::loadMapNode(const TreeNode<Map*> &node, MapAction *&action,
bool GUI::loadMap(const QString &fileName, MapAction *&action, int &showError)
{
QString path;
QUrl url(fileName);
path = url.isLocalFile() ? url.toLocalFile() : fileName;
TreeNode<Map*> maps(MapList::loadMaps(path, _mapView->inputProjection()));
TreeNode<Map*> maps(MapList::loadMaps(fileName, _mapView->inputProjection()));
QList<QAction*> existingActions(_mapsActionGroup->actions());
return loadMapNode(maps, action, existingActions, showError);