ソースを参照

修复容器池删除bug

Menglan_Luo 2 年 前
コミット
2be117a2e7
1 ファイル変更1 行追加1 行削除
  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);