1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-20 10:54:14 +01:00

GCS/core: Place empty gadget first in drop down list.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@534 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
ephy 2010-04-21 05:47:38 +00:00 committed by ephy
parent 2cadc80818
commit 5b5cdd23fa

View File

@ -88,9 +88,12 @@ UAVGadgetView::UAVGadgetView(Core::UAVGadgetManager *uavGadgetManager, IUAVGadge
int index = 0;
foreach(QString classId, sl)
{
m_uavGadgetList->addItem(im->gadgetName(classId), classId);
if (classId == QString("EmptyGadget"))
m_defaultIndex = index;
if (classId == QString("EmptyGadget")) {
m_defaultIndex = 0;
m_uavGadgetList->insertItem(0, im->gadgetName(classId), classId);
} else {
m_uavGadgetList->addItem(im->gadgetName(classId), classId);
}
++index;
}