     private var delete: Bool = false
     private var num: Int?
     private var index: Int?
-    var diddissappear: Bool = false
+    var lastindex: Int?
 
     @IBOutlet weak var snapshotstable: NSTableView!
     @IBOutlet weak var localCatalog: NSTextField!


    override func viewDidAppear() {
        super.viewDidAppear()
        guard self.diddissappear == false else { return }
        self.deletebutton.isEnabled = false
        self.delete = false
        self.snapshotsloggdata = nil
        self.progressdelete.isHidden = true
        self.info(num: 0)
        self.initdeletesnapshots()
        if let index = self.index(viewcontroller: .vctabmain) {
            let hiddenID = self.configurations?.gethiddenID(index: index)
            if self.configurations?.getConfigurations()[index].task == "snapshot" {
                self.getSource(index: hiddenID!)
                self.info(num: 6)
            } else {
                self.info(num: 7)
            }
        } else {
            self.info(num: 8)
            globalMainQueue.async(execute: { () -> Void in
                self.snapshotstable.reloadData()
            })


    override func viewDidDisappear() {
        super.viewDidDisappear()
        self.lastindex = self.index
    }

    private func deletesnapshotcatalogs() {
