(fw+cpn) libsim not loading models, set mod on new lbl

This commit is contained in:
dlktdr
2022-09-06 21:04:10 +10:00
committed by Peter Feerick
parent 7825f8be74
commit aec0639e66
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -1633,12 +1633,14 @@ void MdiChild::modelSave()
void MdiChild::labelAdd()
{
labelsListModel->insertRow(0);
setWindowModified(true);
}
void MdiChild::labelDelete()
{
int row = ui->lstLabels->selectionModel()->currentIndex().row();
labelsListModel->removeRow(row);
setWindowModified(true);
}
void MdiChild::modelLabelsChanged()
+1 -1
View File
@@ -946,7 +946,7 @@ bool ModelsList::loadYaml()
// Scan all models in folder
DIR moddir;
FILINFO finfo;
if (f_opendir(&moddir, PATH_SEPARATOR MODELS_PATH) == FR_OK) {
if (f_opendir(&moddir, MODELS_PATH) == FR_OK) {
for (;;) {
FRESULT res = f_readdir(&moddir, &finfo);
if (res != FR_OK || finfo.fname[0] == 0) break;