TerraSync: add another ‘is downloading’ helper
This commit is contained in:
parent
59307e9ba2
commit
a49619fa6c
@ -1362,14 +1362,18 @@ void SGTerraSync::setSceneryPathSuffixes(const string_list& suffixes)
|
||||
}
|
||||
|
||||
bool SGTerraSync::isTileDirPending(const std::string& sceneryDir) const
|
||||
{
|
||||
return innerIsTileDirPending(sceneryDir, false);
|
||||
}
|
||||
|
||||
bool SGTerraSync::innerIsTileDirPending(const std::string& sceneryDir, bool isOSM) const
|
||||
{
|
||||
if (!_workerThread->isRunning()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
for (const auto& suffix : _sceneryPathSuffixes) {
|
||||
// don't wait on OSM dirs, even if enabled
|
||||
if (isOSMSuffix(suffix)) {
|
||||
if (isOSM != isOSMSuffix(suffix)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -1382,6 +1386,11 @@ bool SGTerraSync::isTileDirPending(const std::string& sceneryDir) const
|
||||
return false;
|
||||
}
|
||||
|
||||
bool SGTerraSync::isTileDirPendingOSM(const std::string& sceneryDir) const
|
||||
{
|
||||
return innerIsTileDirPending(sceneryDir, true);
|
||||
}
|
||||
|
||||
void SGTerraSync::scheduleDataDir(const std::string& dataDir)
|
||||
{
|
||||
if (!_workerThread->isRunning()) {
|
||||
|
@ -81,6 +81,7 @@ public:
|
||||
*/
|
||||
bool isTileDirPending(const std::string& sceneryDir) const;
|
||||
|
||||
bool isTileDirPendingOSM(const std::string& sceneryDir) const;
|
||||
|
||||
void scheduleDataDir(const std::string& dataDir);
|
||||
|
||||
@ -94,6 +95,8 @@ protected:
|
||||
private:
|
||||
void writeWarningFile(const SGPath& sceneryDir);
|
||||
|
||||
bool innerIsTileDirPending(const std::string& sceneryDir, bool isOSM) const;
|
||||
|
||||
private:
|
||||
WorkerThread* _workerThread;
|
||||
SGPropertyNode_ptr _terraRoot;
|
||||
|
Loading…
Reference in New Issue
Block a user