mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-23 06:05:45 +00:00
Don't process completions in widget if completion is not enabled
This commit is contained in:
@@ -229,17 +229,20 @@ void RDTextEdit::keyPressEvent(QKeyEvent *e)
|
||||
|
||||
bool completionShortcut = false;
|
||||
|
||||
// tab triggers completion
|
||||
if(e->key() == Qt::Key_Tab)
|
||||
completionShortcut = true;
|
||||
|
||||
// as does ctrl-space and ctrl-E
|
||||
if(e->modifiers() & Qt::ControlModifier)
|
||||
if(m_Completer && m_CompletionModel)
|
||||
{
|
||||
if(e->key() == Qt::Key_E)
|
||||
completionShortcut = true;
|
||||
if(e->key() == Qt::Key_Space)
|
||||
// tab triggers completion
|
||||
if(e->key() == Qt::Key_Tab)
|
||||
completionShortcut = true;
|
||||
|
||||
// as does ctrl-space and ctrl-E
|
||||
if(e->modifiers() & Qt::ControlModifier)
|
||||
{
|
||||
if(e->key() == Qt::Key_E)
|
||||
completionShortcut = true;
|
||||
if(e->key() == Qt::Key_Space)
|
||||
completionShortcut = true;
|
||||
}
|
||||
}
|
||||
|
||||
// add ctrl-end and ctrl-home shortcuts, which aren't implemented for read-only edits
|
||||
|
||||
Reference in New Issue
Block a user