Commit e54a959e authored by Fawzi Mohamed's avatar Fawzi Mohamed Committed by Tobias Hunger
Browse files

Editor: fix to always call forceReadOnly before activation

Move the call to force readOnly to before the activation for the editors
that had it after their activation call.
Not having signals, currently dynamic changes of the editor read only
state are not really supported, and on windows some actions remained
activated.

Task-number: QTCREATORBUG-4774
Change-Id: I09a84c6e558ddf61aeedb928f8688f6ed65e89c0
Reviewed-on: http://codereview.qt.nokia.com/20

Reviewed-by: default avatarTobias Hunger <tobias.hunger@nokia.com>
parent 0262795c
......@@ -489,8 +489,8 @@ VCSBase::VCSBaseEditorWidget *GitClient::createVCSEditor(const QString &id,
if (setSourceCodec)
rc->setCodec(VCSBase::VCSBaseEditorWidget::getCodec(source));
m_core->editorManager()->activateEditor(outputEditor, Core::EditorManager::ModeSwitch);
rc->setForceReadOnly(true);
m_core->editorManager()->activateEditor(outputEditor, Core::EditorManager::ModeSwitch);
if (configWidget)
rc->setConfigurationWidget(configWidget);
......
......@@ -494,8 +494,8 @@ VCSBase::VCSBaseEditorWidget *VCSBaseClient::createVCSEditor(const QString &kind
baseEditor->setCodec(VCSBase::VCSBaseEditorWidget::getCodec(source));
}
d->m_core->editorManager()->activateEditor(outputEditor, Core::EditorManager::ModeSwitch);
baseEditor->setForceReadOnly(true);
d->m_core->editorManager()->activateEditor(outputEditor, Core::EditorManager::ModeSwitch);
return baseEditor;
}
......
Markdown is supported
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