Changeset 78f8f86


Ignore:
Timestamp:
02/01/17 03:20:04 (4 weeks ago)
Author:
Martin Kolman <255628@…>
Branches:
master
Parents:
552c312 (diff), 3f08518 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Martin Kolman <255628@…> (02/01/17 03:20:04)
git-committer:
Martin Kolman <255628@…> (02/01/17 03:20:04)
Message:

Merge branch 'master' of git://github.com/M4rtinK/modrana

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • modules/gui_modules/gui_qt5/qml/PinchMap.qml

    r83ca3f1 r253a6f2  
    177177    WorkerScript { 
    178178        id : updateTilesModelWorker 
     179        property bool workerInitialized: false 
     180        property var replayMessages : [] 
    179181        source : "workers/update_tiles_model.js" 
    180182        onMessage: { 
     
    202204        } 
    203205 
     206        Component.onCompleted: { 
     207            rWin.log.debug("Tile model worker script has been initialized.") 
     208            updateTilesModelWorker.workerInitialized = true 
     209            // Try to replay a messages that might have been 
     210            // stored due to worker script not being initialized yet. 
     211            // Ignoring such messages might result in no map tiles being shown. 
     212            if (replayMessages != []) { 
     213                rWin.log.debug("Replaying deferred messages to tile model worker script.") 
     214                for (var i=0; i<replayMessages.length; i++) { 
     215                    rWin.log.debug("Replaying message nr.: " + (i+1)) 
     216                    updateTilesModelWorker.sendMessage(replayMessages[i]) 
     217                } 
     218                replayMessages = [] 
     219            } 
     220        } 
    204221    } 
    205222 
     
    217234            tileRequestTimerPause = true 
    218235            // start the asynchronous tile model update 
    219             updateTilesModelWorker.sendMessage( 
    220                 { 
     236            if (updateTilesModelWorker.workerInitialized) { 
     237                updateTilesModelWorker.sendMessage( 
     238                    { 
     239                        cornerX : pinchmap.cornerTileX, 
     240                        cornerY : pinchmap.cornerTileY, 
     241                        tilesX : pinchmap.numTilesX, 
     242                        tilesY : pinchmap.numTilesY, 
     243                        tilesModel : pinchmap.tilesModel, 
     244                        shouldBeOnScreen : pinchmap.shouldBeOnScreen 
     245                    } 
     246                ) 
     247            } else { 
     248                rWin.log.debug("Worker script not yet initialized.") 
     249                updateTilesModelWorker.replayMessages.push({ 
    221250                    cornerX : pinchmap.cornerTileX, 
    222251                    cornerY : pinchmap.cornerTileY, 
     
    225254                    tilesModel : pinchmap.tilesModel, 
    226255                    shouldBeOnScreen : pinchmap.shouldBeOnScreen 
    227                 } 
    228             ) 
     256                }) 
     257            } 
    229258        } 
    230259    } 
  • packaging/modrana.spec

    r19040cb r3f08518  
    1414%endif 
    1515Url: http://modrana.org 
    16 Version: 0.54.2 
     16Version: 0.54.3 
    1717Source0: modrana-%{version}.tar.gz 
    1818 
     
    126126 
    127127%changelog 
     128* Wed Feb 01 2017 Martin Kolman <martin.kolman@gmail.com> - 0.54.3-1 
     129- Possible fix for no tiles being shown at startup (martin.kolman) 
     130- Fix place search (martin.kolman) 
     131 
    128132* Tue Jan 31 2017 Martin Kolman <martin.kolman@gmail.com> - 0.54.2-1 
    129133- Rename Address search to Place search (martin.kolman) 
Note: See TracChangeset for help on using the changeset viewer.