mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-27 21:24:47 +01:00
Fixed map dir loading on Android
This commit is contained in:
parent
7118794b26
commit
23e8154a1f
@ -76,7 +76,7 @@ ToolTip MapItem::info() const
|
|||||||
if (!_name.isEmpty())
|
if (!_name.isEmpty())
|
||||||
tt.insert(tr("Name"), _name);
|
tt.insert(tr("Name"), _name);
|
||||||
if (!_fileName.isEmpty())
|
if (!_fileName.isEmpty())
|
||||||
tt.insert(tr("File"), _fileName);
|
tt.insert(tr("File"), Util::displayName(_fileName));
|
||||||
|
|
||||||
return tt;
|
return tt;
|
||||||
}
|
}
|
||||||
@ -212,6 +212,10 @@ void MapItem::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
|
|||||||
|
|
||||||
_pen.setWidthF((_width + 1) * pow(2, -_digitalZoom));
|
_pen.setWidthF((_width + 1) * pow(2, -_digitalZoom));
|
||||||
update();
|
update();
|
||||||
|
|
||||||
|
#ifdef Q_OS_ANDROID
|
||||||
|
Popup::show(event->screenPos(), info(), event->widget());
|
||||||
|
#endif // Q_OS_ANDROID
|
||||||
}
|
}
|
||||||
|
|
||||||
void MapItem::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
|
void MapItem::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
|
||||||
|
@ -101,7 +101,11 @@ TreeNode<Map *> MapList::loadDir(const QString &path, const Projection &proj,
|
|||||||
md.setFilter(QDir::Files | QDir::Dirs | QDir::NoDotAndDotDot);
|
md.setFilter(QDir::Files | QDir::Dirs | QDir::NoDotAndDotDot);
|
||||||
md.setSorting(QDir::DirsLast);
|
md.setSorting(QDir::DirsLast);
|
||||||
QFileInfoList ml = md.entryInfoList();
|
QFileInfoList ml = md.entryInfoList();
|
||||||
TreeNode<Map*> tree(md.dirName());
|
#ifdef Q_OS_ANDROID
|
||||||
|
TreeNode<Map*> tree(Util::displayName(path));
|
||||||
|
#else // Q_OS_ANDROID
|
||||||
|
TreeNode<Map*> tree(Util::displayName(md.dirName()));
|
||||||
|
#endif // Q_OS_ANDROID
|
||||||
|
|
||||||
for (int i = 0; i < ml.size(); i++) {
|
for (int i = 0; i < ml.size(); i++) {
|
||||||
const QFileInfo &fi = ml.at(i);
|
const QFileInfo &fi = ml.at(i);
|
||||||
|
Loading…
Reference in New Issue
Block a user