forked from qt-creator/qt-creator
Fix follow symbol in next split, and simplify code
Follow symbol in next split broke with fd9b2af921
because the flag was no longer handled through EditorManager::openEditorAt
Also remove the flag NoNewSplits which is no longer used, and simplify
how links are opened from the C++ editor.
Change-Id: I845cc3a0a43d82b79d5c46a273232b69fd6e3ea9
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
@@ -5334,16 +5334,18 @@ bool BaseTextEditorWidget::openLink(const Link &link, bool inNextSplit)
|
||||
if (!link.hasValidTarget())
|
||||
return false;
|
||||
|
||||
if (inNextSplit) {
|
||||
EditorManager::gotoOtherSplit();
|
||||
} else if (textDocument()->filePath() == link.targetFileName) {
|
||||
if (!inNextSplit && textDocument()->filePath() == link.targetFileName) {
|
||||
EditorManager::addCurrentPositionToNavigationHistory();
|
||||
gotoLine(link.targetLine, link.targetColumn);
|
||||
setFocus();
|
||||
return true;
|
||||
}
|
||||
EditorManager::OpenEditorFlags flags;
|
||||
if (inNextSplit)
|
||||
flags |= EditorManager::OpenInOtherSplit;
|
||||
|
||||
return EditorManager::openEditorAt(link.targetFileName, link.targetLine, link.targetColumn);
|
||||
return EditorManager::openEditorAt(link.targetFileName, link.targetLine, link.targetColumn,
|
||||
Id(), flags);
|
||||
}
|
||||
|
||||
void BaseTextEditorWidgetPrivate::updateLink(QMouseEvent *e)
|
||||
|
||||
Reference in New Issue
Block a user