Commit 0e70a54b authored by Alexander Semke's avatar Alexander Semke
Browse files

Leave the markdown cell in the edit mode if the the user hits the

cancel/escape button. This allows to leave the cell after an
accidential/unwanted entry via a double-click without evaluating
the cell and without setting the project to "changed".
parent 5ee27816
......@@ -28,6 +28,7 @@
#include <QBuffer>
#include <KLocalizedString>
#include <QDebug>
#include <QKeyEvent>
#include <QStandardPaths>
#include <QDir>
#include <QFileDialog>
......@@ -467,6 +468,16 @@ bool MarkdownEntry::eventFilter(QObject* object, QEvent* event)
else if (event->type() == QEvent::KeyPress)
auto* key_event = static_cast<QKeyEvent*>(event);
if (key_event->matches(QKeySequence::Cancel))
rendered = true;
return true;
return false;
Supports Markdown
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