Commit 5099889a authored by Locatelli's avatar Locatelli
Browse files

Add confirmation box for deleting roi

parent 62259f3b
......@@ -20,6 +20,7 @@
#include <QPushButton>
#include <QLabel>
#include <QHBoxLayout>
#include <QMessageBox>
#include <boost/lexical_cast.hpp>
#include <iomanip>
......@@ -206,9 +207,19 @@ void QtRoiWidget::validateRoi() {
*/
void QtRoiWidget::deleteRoi() {
try {
DBGMSG("delete roi number : " << m_Id);
manager::InterfaceManager::getInstance()->deleteRoi(m_Id);
m_QtWindow->deleteRoi(m_Id);
QMessageBox msgBox;
msgBox.setText("Do you want to delete this ROI?");
msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
msgBox.setDefaultButton(QMessageBox::No);
int ret = msgBox.exec();
if (ret == QMessageBox::Yes) {
DBGMSG("delete roi number : " << m_Id);
manager::InterfaceManager::getInstance()->deleteRoi(m_Id);
m_QtWindow->deleteRoi(m_Id);
}
else {
// do nothing
}
}
catch(...) {
Error("QtRoiWidget", "deleteRoi", "Error executing deleteRoi");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment