refs #720, file name handling in models

* normalize file name before writing to DB
* use local file paths for local models
* display "C" for color liveries
This commit is contained in:
Klaus Basan
2016-08-12 02:58:50 +02:00
committed by Mathew Sutcliffe
parent 1a4b0c5e76
commit 364914cc31
6 changed files with 73 additions and 15 deletions

View File

@@ -30,10 +30,12 @@ namespace BlackCore
if (modified) { *modified = false; }
if (!model.hasModelString()) { return model; }
if (!force && model.hasValidDbKey()) { return model; }
CAircraftModel dbModel(sApp->getWebDataServices()->getModelForModelString(model.getModelString()));
if (dbModel.hasValidDbKey())
{
if (modified) { *modified = true; }
dbModel.updateByLocalFileNames(model);
return dbModel;
}
@@ -66,6 +68,7 @@ namespace BlackCore
if (modified) { *modified = true; }
consolidatedModel.setDistributor(dbDistributor);
}
consolidatedModel.updateByLocalFileNames(model);
return consolidatedModel;
}