added enable/disable for Routines for current Bkup run. show/hide sources/destinations by enabled status

This commit is contained in:
itwrx
2023-06-29 07:09:23 -05:00
parent 22abe65ab0
commit e7e156868e
5 changed files with 42 additions and 25 deletions

View File

@@ -184,4 +184,13 @@ proc clear*(model: RoutineModel) =
model.db.exec("DELETE FROM Routine")
# Update RoutineModel.routines
model.routines.clear()
model.routines.clear()
#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