1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-11-29 07:24:13 +01:00

LP-565 pfd gadget: make saved model file path relative to GCS data path

This commit is contained in:
Philippe Renon 2017-12-10 16:05:34 +01:00
parent 213893e298
commit 01c87ce56b

View File

@ -328,12 +328,12 @@ void PfdQmlContext::loadConfiguration(PfdQmlGadgetConfiguration *config)
void PfdQmlContext::saveState(QSettings &settings) const
{
settings.setValue("modelFile", modelFile());
settings.setValue("modelFile", Utils::RemoveDataPath(modelFile()));
}
void PfdQmlContext::restoreState(QSettings &settings)
{
QString file = settings.value("modelFile").toString();
QString file = Utils::InsertDataPath(settings.value("modelFile").toString());
if (!file.isEmpty()) {
setModelFile(file);