Skip to content

Commit

Permalink
Sort custom functions list
Browse files Browse the repository at this point in the history
  • Loading branch information
elecpower committed May 27, 2024
1 parent e033da9 commit 3e1c412
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions companion/src/datamodels/compounditemmodels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,8 @@ CustomFuncActionItemModel::CustomFuncActionItemModel(const GeneralSettings * con
setDynamicItemData(modelItem, i);
appendRow(modelItem);
}

sort(0);
}

void CustomFuncActionItemModel::setDynamicItemData(QStandardItem * item, const int value) const
Expand All @@ -452,6 +454,8 @@ void CustomFuncActionItemModel::update(const int event)
for (int i = 0; i < rowCount(); ++i)
setDynamicItemData(item(i), item(i)->data(IMDR_Id).toInt());

sort(0);

emit updateComplete();
}
}
Expand Down

0 comments on commit 3e1c412

Please sign in to comment.