Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions qt/main_window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,22 @@ void MainWindow::slotProgWrite()
int index;
QString chipName;

// Add confirmation dialog
QMessageBox msgBox;
msgBox.setWindowTitle(tr("Confirm write"));
msgBox.setText(tr("Are you sure you want to write the chip?"));
msgBox.setIcon(QMessageBox::Warning);
msgBox.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel);
msgBox.setDefaultButton(QMessageBox::Cancel);

// If the user clicks cancel, exit the function.
if (msgBox.exec() != QMessageBox::Ok)
{
qInfo() << "User canceled the write operation";
return;
}


workFile.setFileName(ui->filePathLineEdit->text());
if (!workFile.open(QIODevice::ReadOnly))
{
Expand Down