Commit 078f3c6e authored by Tobias Hunger's avatar Tobias Hunger
Browse files

EditorManager: Fix opening of editors based on editor id

Make sure the editor with the requested id will be in the
list of editors to use to open files. This unbreaks e.g.
the git submit editor which opens an empty file.

Change-Id: I51c76ae13ddf0077e895ca0a9b7797f664888c0f
Reviewed-by: default avatarEike Ziller <>
Reviewed-by: default avatarOrgad Shaneh <>
parent e1f47f67
......@@ -583,8 +583,12 @@ IEditor *EditorManagerPrivate::openEditor(EditorView *view, const QString &fileN
EditorManager::EditorFactoryList factories = EditorManagerPrivate::findFactories(Id(), fn);
if (editorId.isValid())
std::stable_partition(factories.begin(), factories.end(), Utils::equal(&IEditorFactory::id, editorId));
if (editorId.isValid()) {
if (IEditorFactory *factory = findById<IEditorFactory>(editorId)) {
IEditor *editor = 0;
auto overrideCursor = Utils::OverrideCursor(QCursor(Qt::WaitCursor));
Supports Markdown
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