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
+4 -2
View File
@@ -1626,9 +1626,11 @@ int MainWindow::newProfile(bool loadProfile)
if (i == MAX_PROFILES) //Failed to find free slot
return -1;
Firmware *newfw = Firmware::getDefaultVariant();
g.profile[i].init();
g.profile[i].name(tr("New Radio"));
g.profile[i].fwType(Firmware::getDefaultVariant()->getId());
g.profile[i].name("New Radio");
g.profile[i].fwType(newfw->getId());
g.profile[i].defaultInternalModule(Boards::getDefaultInternalModules(newfw->getBoard()));
if (loadProfile) {
if (loadProfileId(i))