Pārlūkot izejas kodu

修复容器池删除bug

Menglan_Luo 2 gadi atpakaļ
vecāks
revīzija
2be117a2e7
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      pool.cpp

+ 1 - 1
pool.cpp

@@ -266,7 +266,7 @@ void Pool::on_pushButton_delKey_clicked()
 {
     int poolIndex = ui->listWidget_pool->currentRow();
     int row = ui->tableWidget_containerPool->currentRow();
-    if(poolIndex == -1 && row == -1) return;
+    if(poolIndex == -1 || row == -1) return;
     QMessageBox::StandardButton reply = QMessageBox::question(this,"删除键值","确定要删除此键值吗?");
     if(reply == QMessageBox::Yes){
         ui->tableWidget_containerPool->removeRow(row);