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:
parent
2cadc80818
commit
5b5cdd23fa
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user