Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Instrument Control
Ploty2
Commits
5099889a
Commit
5099889a
authored
Nov 29, 2019
by
Locatelli
Browse files
Add confirmation box for deleting roi
parent
62259f3b
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/view/qt/QtRoiWidget.cpp
View file @
5099889a
...
...
@@ -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"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment