Commit 465890ac authored by Christian Kamm's avatar Christian Kamm
Browse files

C++: Jump to better location when function signature is updated.

This will allow using 'Follow Symbol' to jump back after the change.

Change-Id: I99fd3ebc63a2af58b12eee9d7055a4c2f249e97d
Reviewed-on: http://codereview.qt.nokia.com/4186

Reviewed-by: default avatarLeandro T. C. Melo <leandro.melo@nokia.com>
parent e99f9156
......@@ -300,8 +300,10 @@ void FunctionDeclDefLink::apply(CPPEditorWidget *editor, bool jumpToMatch)
if (targetInitial == newTargetFile->textOf(targetStart, targetEnd)) {
const Utils::ChangeSet changeset = changes(snapshot, targetStart);
newTargetFile->setChangeSet(changeset);
if (jumpToMatch)
newTargetFile->setOpenEditor(true, targetStart);
if (jumpToMatch) {
const int jumpTarget = newTargetFile->position(targetFunction->line(), targetFunction->column());
newTargetFile->setOpenEditor(true, jumpTarget);
}
newTargetFile->apply();
} else {
TextEditor::ToolTip::instance()->show(
......
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