mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-11-10 16:09:09 +00:00
Don't process completions in widget if completion is not enabled
This commit is contained in:
1 file changed
+12
-9
@@ -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