[Marble-devel] Re: Problems with map creation or: The curse of QFileSystemWatcher

Mülner, Helmut helmut.muelner at joanneum.at
Tue Jun 14 10:18:28 CEST 2011


the issue with the fuzzy maps is resolved: I used ald dgml files that did not contain the line
<storageLayout maximumTileLevel="2"/>

Now everything is sharp again.
But there is still a minor issue: dgml files are read at least twice during startup and also when the tile cache changes.

Best regards
Helmut Mülner

Von: Mülner, Helmut [helmut.muelner at joanneum.at]
Gesendet: Dienstag, 14. Juni 2011 09:46
An: marble-devel at kde.org
Betreff: [Marble-devel] Problems with map creation or: The curse of QFileSystemWatcher


I resolved part of the focus problem by prohibiting redundant updates of the theme model:

void MapThemeManager::updateMapThemeModel()
    mDebug() << "updateMapThemeModel";
    int currentCount = d->m_mapThemeModel->rowCount();
    QStringList stringlist = findMapThemes();
    if (currentCount == stringlist.size()) {
        // nothing changed

Of course there still should be code to remember the selected map theme and restore it after the update.

I still have the issue of fuzzy maps after runtime map generation.
You may be able to reproduce it with this steps:
 - remove the local tile cache of schagen1689
 - start marble with the plain map
 - zoom in several times
 - select the schagen1689 theme
 -> the map may be fuzzy

I think I found the reason of this behaviour: It seems to be another data race caused by the QFileSystemWatcher:
When a local map directory changes all dgml files are reloaded, which seems to be in parallel to tile creation.
The end result on my system (Windows7) is that  GeoSceneTexture::m_maximumTileLevel changes to -1
with the result that only level 0 tile are used.

If you select the plan map and then again the schagen1689 map the GeoSceneTexture::m_maximumTileLevel is set correctly.

Best regards

Helmut Mülner
Marble-devel mailing list
Marble-devel at kde.org

More information about the Marble-devel mailing list