Commit eebe9e2f authored by Thorbjørn Lindeijer's avatar Thorbjørn Lindeijer

Clear link emulation when Ctrl is released

parent c08405fe
...@@ -832,6 +832,15 @@ void CPPEditor::mouseReleaseEvent(QMouseEvent *e) ...@@ -832,6 +832,15 @@ void CPPEditor::mouseReleaseEvent(QMouseEvent *e)
TextEditor::BaseTextEditor::mouseReleaseEvent(e); TextEditor::BaseTextEditor::mouseReleaseEvent(e);
} }
void CPPEditor::keyReleaseEvent(QKeyEvent *e)
{
// Clear link emulation when Ctrl is released
if (e->key() == Qt::Key_Control) {
setExtraSelections(OtherSelection, QList<QTextEdit::ExtraSelection>());
viewport()->setCursor(Qt::IBeamCursor);
}
}
QList<int> CPPEditorEditable::context() const QList<int> CPPEditorEditable::context() const
{ {
return m_context; return m_context;
......
...@@ -96,9 +96,10 @@ public slots: ...@@ -96,9 +96,10 @@ public slots:
void deleteEndOfToken(); void deleteEndOfToken();
protected: protected:
void contextMenuEvent(QContextMenuEvent *e); void contextMenuEvent(QContextMenuEvent *);
void mouseMoveEvent(QMouseEvent *e); void mouseMoveEvent(QMouseEvent *);
void mouseReleaseEvent(QMouseEvent *e); void mouseReleaseEvent(QMouseEvent *);
void keyReleaseEvent(QKeyEvent *);
TextEditor::BaseTextEditorEditable *createEditableInterface(); TextEditor::BaseTextEditorEditable *createEditableInterface();
......
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