updates for installable version

This commit is contained in:
itwrx
2023-07-05 14:47:04 -05:00
parent c37891ede9
commit 96c84fe983
5 changed files with 25 additions and 5 deletions

View File

@@ -184,4 +184,13 @@ proc delete*(model: RoutineModel, id: RoutineId) =
model.db.exec("DELETE FROM Routine WHERE id = ?", id)
# Update RoutineModel.routines
model.routines.del(id)
model.routines.del(id)
#preload the selected seq with routines that have selByDef == true.
proc selectedPreload*(): seq[RoutineId] =
var selected: seq[RoutineId]
let model = newRoutineModel(databasePath)
for routine in model.routineSeq():
if routine.selByDef == true:
selected.add(routine.id)
return selected