From e217f8fc31921c35b40d2b141d418bfe36e0b3fb Mon Sep 17 00:00:00 2001 From: cranphin Date: Wed, 22 Sep 2010 22:28:52 +0000 Subject: [PATCH] GCS: Whoops! I broke saving layout for empty workspaces. This should fix it, Sorry! :) git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1723 ebee16cc-31ac-478f-84a7-5cbb03baadba --- .../coreplugin/uavgadgetmanager/uavgadgetview.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/ground/src/plugins/coreplugin/uavgadgetmanager/uavgadgetview.cpp b/ground/src/plugins/coreplugin/uavgadgetmanager/uavgadgetview.cpp index fdee3f34a..6f5f4386b 100644 --- a/ground/src/plugins/coreplugin/uavgadgetmanager/uavgadgetview.cpp +++ b/ground/src/plugins/coreplugin/uavgadgetmanager/uavgadgetview.cpp @@ -599,14 +599,12 @@ void SplitterOrView::saveState(QSettings* qSettings) const { qSettings->beginGroup("side1"); static_cast(m_splitter->widget(1))->saveState(qSettings); qSettings->endGroup(); - } else { + } else if (gadget()) { qSettings->setValue("type", "uavGadget"); qSettings->setValue("classId", gadget()->classId()); - if (gadget()) { - qSettings->beginGroup("gadget"); - gadget()->saveState(qSettings); - qSettings->endGroup(); - } + qSettings->beginGroup("gadget"); + gadget()->saveState(qSettings); + qSettings->endGroup(); } }