Set default internal module in profile

This commit is contained in:
elecpower
2022-01-02 13:05:09 +01:00
committed by Raphael Coeffic
parent 417c7f1247
commit 2a13dba411
4 changed files with 13 additions and 6 deletions
+2 -3
View File
@@ -25,7 +25,6 @@
#include "radiodataconversionstate.h"
#include "compounditemmodels.h"
#include "generalsettings.h"
#include "datahelpers.h"
#include <QPair>
#include <QVector>
@@ -359,12 +358,12 @@ QString ModuleData::typeToString(int type)
return CHECK_IN_ARRAY(strings, type);
}
AbstractStaticItemModel * ModuleData::internalModuleItemModel()
AbstractStaticItemModel * ModuleData::internalModuleItemModel(int board)
{
AbstractStaticItemModel * mdl = new AbstractStaticItemModel();
mdl->setName("moduledata.internalmodule");
auto modules = Boards::getSupportedInternalModules(getCurrentBoard());
auto modules = Boards::getSupportedInternalModules(board == Board::BOARD_UNKNOWN ? getCurrentBoard() : (Board::Type)board);
for(auto mod : modules) {
mdl->appendToItemList(typeToString(mod), mod);
}