         }
         switch self.selectplan.indexOfSelectedItem {
         case 1:
+            self.config!.snaplast = 1
             _ = PlanSnapshots(plan: 1, snapdayoffweek: self.config?.snapdayoffweek ?? "Sunday")
         case 2:
+            self.config!.snaplast = 2
             _ = PlanSnapshots(plan: 2, snapdayoffweek: self.config?.snapdayoffweek ?? "Sunday")
         default:
             return

extension ViewControllerSnapshots: NSComboBoxDelegate {
    func comboBoxSelectionDidChange(_ notification: Notification) {
        guard self.config != nil  else { return }
        switch self.selectdayofweek.indexOfSelectedItem {
        case 0:
            self.config!.snapdayoffweek = StringDayofweek.Sunday.rawValue

        self.stringdeletesnapshotsdaysnum.delegate = self
        self.selectplan.delegate = self
        self.selectdayofweek.delegate = self
        self.savebutton.isEnabled = false
        ViewControllerReference.shared.setvcref(viewcontroller: .vcsnapshot, nsviewcontroller: self)
    }

