Clear link emulation when Ctrl is released

This commit is contained in:
Thorbjørn Lindeijer
2009-03-24 11:12:24 +01:00
parent c08405fed4
commit eebe9e2fc8
2 changed files with 13 additions and 3 deletions

View File

@@ -832,6 +832,15 @@ void CPPEditor::mouseReleaseEvent(QMouseEvent *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
{
return m_context;