VCS: Open diff/blame editors in other split

... if there are other splits that is.

Task-number: QTCREATORBUG-11623
Change-Id: Icb3b1c86c39d88e90916079e8ab347574ae9a361
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
Tobias Hunger
2014-03-05 17:50:55 +01:00
committed by Eike Ziller
parent f6f8e56cf1
commit 02b3a79c5f
8 changed files with 28 additions and 10 deletions

View File

@@ -100,7 +100,9 @@ DiffEditorDocument *DiffEditorManager::findOrCreate(const QString &documentId, c
const QString msgWait = tr("Waiting for data...");
DiffEditor *diffEditor = qobject_cast<DiffEditor *>(
Core::EditorManager::openEditorWithContents(Constants::DIFF_EDITOR_ID,
0, msgWait.toUtf8()));
0, msgWait.toUtf8(),
(Core::EditorManager::OpenInOtherSplit
| Core::EditorManager::NoNewSplits)));
QTC_ASSERT(diffEditor, return 0);
document = qobject_cast<DiffEditorDocument *>(diffEditor->document());

View File

@@ -102,8 +102,9 @@ void DiffEditorPlugin::diff()
//: Editor title
QString title = tr("Diff \"%1\", \"%2\"").arg(fileName1).arg(fileName2);
DiffEditor *editor = qobject_cast<DiffEditor *>
(Core::EditorManager::openEditorWithContents(editorId, &title));
(Core::EditorManager::openEditorWithContents(editorId, &title, QByteArray(),
(Core::EditorManager::OpenInOtherSplit
| Core::EditorManager::NoNewSplits)));
if (!editor)
return;