From 318a60e05ef687d4e109366f715024cbc73552d9 Mon Sep 17 00:00:00 2001 From: cranphin Date: Sun, 19 Sep 2010 19:16:01 +0000 Subject: [PATCH] GCS UAVGadgetManager: Minor bugfix, wasn't always deleting oldstyle subgroups, which would cause them to be loaded. git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1693 ebee16cc-31ac-478f-84a7-5cbb03baadba --- .../coreplugin/uavgadgetmanager/uavgadgetmanager.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ground/src/plugins/coreplugin/uavgadgetmanager/uavgadgetmanager.cpp b/ground/src/plugins/coreplugin/uavgadgetmanager/uavgadgetmanager.cpp index ce19ea804..d47e692b6 100644 --- a/ground/src/plugins/coreplugin/uavgadgetmanager/uavgadgetmanager.cpp +++ b/ground/src/plugins/coreplugin/uavgadgetmanager/uavgadgetmanager.cpp @@ -497,10 +497,13 @@ void UAVGadgetManager::saveSettings(QSettings *qs) // remove them for now. Since we no longer have two // possible groups, we can remove the non default one too. // TODO: Remove this code, and support for reading default group. - if (qs->childGroups().contains(defaultUAVGadgetManagerKey)) { + if (qs->childKeys().contains(defaultUAVGadgetManagerKey) || + qs->childGroups().contains(defaultUAVGadgetManagerKey)) { qs->remove(defaultUAVGadgetManagerKey); } - if (qs->childGroups().contains(uavGadgetManagerKey)) { + + if (qs->allKeys().contains(uavGadgetManagerKey) || + qs->childGroups().contains(uavGadgetManagerKey)) { qs->remove(uavGadgetManagerKey); }