|
|
@ -25,6 +25,19 @@ CSVWorld::ScriptEdit::ChangeLock::~ChangeLock()
|
|
|
|
--mEdit.mChangeLocked;
|
|
|
|
--mEdit.mChangeLocked;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool CSVWorld::ScriptEdit::event (QEvent *event)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
// ignore undo and redo shortcuts
|
|
|
|
|
|
|
|
if (event->type()==QEvent::ShortcutOverride)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
QKeyEvent *keyEvent = static_cast<QKeyEvent *> (event);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (keyEvent->matches (QKeySequence::Undo) || keyEvent->matches (QKeySequence::Redo))
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return QPlainTextEdit::event (event);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
CSVWorld::ScriptEdit::ScriptEdit (const CSMDoc::Document& document, ScriptHighlighter::Mode mode,
|
|
|
|
CSVWorld::ScriptEdit::ScriptEdit (const CSMDoc::Document& document, ScriptHighlighter::Mode mode,
|
|
|
|
QWidget* parent)
|
|
|
|
QWidget* parent)
|
|
|
|