diff --git a/src/plugins/coreplugin/editormanager/editormanager.cpp b/src/plugins/coreplugin/editormanager/editormanager.cpp index 7b2e0b2362796e6722b2604e74e410480b6460e1..8fd8ef14225eba10dfa2e14f9d074723612e9f8b 100644 --- a/src/plugins/coreplugin/editormanager/editormanager.cpp +++ b/src/plugins/coreplugin/editormanager/editormanager.cpp @@ -1152,7 +1152,7 @@ void EditorManager::updateActions() m_d->m_duplicateAction->setEnabled(curEditor != 0 && curEditor->duplicateSupported()); - m_d->m_openInExternalEditorAction->setEnabled(curEditor != 0); + m_d->m_openInExternalEditorAction->setEnabled(curEditor != 0 && !m_d->m_externalEditor.isEmpty()); } QList<IEditor*> EditorManager::openedEditors() const @@ -1488,6 +1488,9 @@ QString EditorManager::externalEditorHelpText() const void EditorManager::openInExternalEditor() { + if (m_d->m_externalEditor.isEmpty()) + return; + IEditor *editor = currentEditor(); if (!editor) return; @@ -1499,7 +1502,6 @@ void EditorManager::openInExternalEditor() return; } - QRect rect = editor->widget()->rect(); QFont font = editor->widget()->font(); QFontMetrics fm(font);