关闭设备前弹出确认框
This commit is contained in:
parent
05f42b0c59
commit
44c304033b
|
@ -167,8 +167,8 @@ void device_menu::on_act_triggered(QAction* act)
|
|||
checked_now = false;
|
||||
act->setChecked(false);
|
||||
cur_action_ = nullptr;
|
||||
emit scanOptionsChanged("", "", false);
|
||||
return;
|
||||
// emit scanOptionsChanged("", "", false);
|
||||
// return;
|
||||
}
|
||||
else {
|
||||
cur_action_ = act;
|
||||
|
|
|
@ -2814,7 +2814,19 @@ void MainWindow::on_scanOptions_changed(const QString &device, const QString &op
|
|||
}
|
||||
else
|
||||
{
|
||||
cur_dev_.close();
|
||||
if(QMessageBox::question(this, title
|
||||
, QString::fromStdString("\346\202\250\347\241\256\345\256\232\350\246\201\345\205\263\351\227\255 ") + device + QString::fromStdString(" \345\220\227\357\274\237"))
|
||||
== QMessageBox::Yes)
|
||||
{
|
||||
cur_dev_.close();
|
||||
|
||||
m_dialogLog->addLog(QString::fromStdString("\345\205\263\351\227\255 ") + device, false);
|
||||
m_wndStatusBar->setDeviceStatusInfo(QString::fromStdString("\345\205\263\351\227\255 ") + device, false);
|
||||
}
|
||||
else {
|
||||
ui->menu_device->setOptionChecked(device, option, true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
m_dialogLog->updateStatus(cur_dev_.is_online() && 0 != m_scanType, m_isScanning);
|
||||
|
|
Loading…
Reference in New Issue