From 20ea8ad131e874881cb3b96c390f93c328e69f61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=B5=B7?= Date: Mon, 18 May 2026 14:06:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B5=8B=E9=87=8F=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E5=8F=82=E6=95=B0=E9=85=8D=E7=BD=AE=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/MeasureDeviceParamsConfigView/DeviceParamsManagerDlg.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/MeasureDeviceParamsConfigView/DeviceParamsManagerDlg.cpp b/src/MeasureDeviceParamsConfigView/DeviceParamsManagerDlg.cpp index b2741ab..4240277 100644 --- a/src/MeasureDeviceParamsConfigView/DeviceParamsManagerDlg.cpp +++ b/src/MeasureDeviceParamsConfigView/DeviceParamsManagerDlg.cpp @@ -87,7 +87,9 @@ void DeviceParamsManagerDlg::onBtnDelete() if (!ms_cfg_file.remove()) { LOG_WARN(QStringLiteral(u"删除设备测量参数配置[%1]失败: %2").arg(current->text()).arg(ms_cfg_file.errorString())); } else { - ui->listw_cfg_list->removeItemWidget(current); + ui->listw_cfg_list->takeItem(ui->listw_cfg_list->currentRow()); + delete current; + current = nullptr; ui->linedit_cfg_name->clear(); ui->pte_description->clear(); ui->params_table_form->ClearParamsTable();