1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-27 16:54:15 +01:00

OP-1198 allow GCS gadgets to store/restore individual state (needed for OP-1194)

This commit is contained in:
Philippe Renon 2014-01-26 16:30:08 +01:00
parent 5ef7c54c07
commit decb996801

View File

@ -121,6 +121,10 @@ void UAVGadgetDecorator::saveState(QSettings *qSettings)
if (m_activeConfiguration) {
qSettings->setValue("activeConfiguration", m_activeConfiguration->name());
}
// save gadget individual state
qSettings->beginGroup("state");
m_gadget->saveState(qSettings);
qSettings->endGroup();
}
void UAVGadgetDecorator::restoreState(QSettings *qSettings)
@ -134,4 +138,8 @@ void UAVGadgetDecorator::restoreState(QSettings *qSettings)
break;
}
}
// store gadget individual state
qSettings->beginGroup("state");
m_gadget->restoreState(qSettings);
qSettings->endGroup();
}