mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 23:45:35 +08:00
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:
committed by
Mathew Sutcliffe
parent
1a4b0c5e76
commit
364914cc31
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user