Commit d26ad76d authored by Alexander Semke's avatar Alexander Semke
Browse files

Since we don't have the undo/redo functionality yet, removing an entry by an...

Since we don't have the undo/redo functionality yet, removing an entry by an error can result in a lost of a lot of work. 
To at least remedy this problem, pop up a Yes/No-message box and ask the user to confirm.
parent 21c4d54d
......@@ -33,6 +33,7 @@
#include <KColorScheme>
#include <KLocalizedString>
#include <KMessageBox>
#include <QDebug>
struct AnimationData
......@@ -706,6 +707,10 @@ bool WorksheetEntry::aboutToBeRemoved()
void WorksheetEntry::startRemoving()
{
int rc = KMessageBox::warningYesNo(nullptr, i18n("Do you really want to remove this entry?"), i18n("Remove Entry"));
if (rc == KMessageBox::No)
return;
if (!worksheet()->animationsEnabled()) {
m_aboutToBeRemoved = true;
remove();
......
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