Browse Source

Merge branch 'develop' of git.kdan.cc:Mac_PDF/PDF_Office into develop

tangchao 1 year ago
parent
commit
853f17e26e

+ 9 - 1
PDF Office/PDF Office/Class/PDFTools/ImageToPDF/View/KMBatchProcessingView/Tableview/KMBatchProcessingTableView.swift

@@ -333,6 +333,15 @@ extension KMBatchProcessingTableView: NSTableViewDataSource {
             let rowIndexes: NSIndexSet = try!NSKeyedUnarchiver.unarchivedObject(ofClass: NSIndexSet.self, from: rowData)!
             
             if info.draggingSource as? NSTableView == tableView {
+                
+                //移除物件悬浮状态
+                if data != nil {
+                    let model = self.data![rowIndexes.firstIndex]
+                    model.hover = false
+                    let columnIndex = self.tableView.column(withIdentifier: NSUserInterfaceItemIdentifier(KMBatchProcessingTableViewOptions.delete.rawValue.description))
+                    self.tableView.reloadData(forRowIndexes: rowIndexes as IndexSet, columnIndexes: IndexSet(integer: columnIndex))
+                }
+                
                 //数据处理
                 self.data!.move(with: IndexSet(rowIndexes), to: row)
                 /**
@@ -358,7 +367,6 @@ extension KMBatchProcessingTableView: NSTableViewDataSource {
             }
             result = true
         }
-        
         return result
     }