From 000b82523bb68e18ef749a22bc7cac1f037fc72b Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Mon, 2 May 2016 10:40:10 +0200 Subject: [PATCH] QmlJSEditor: Do not open created component The user can easily navigate to the new component and in many cases the user wants to continue in the original document. Change-Id: Id91ed4c0adb26cf91d39be73689aec4f34034488 Reviewed-by: Tim Jenssen --- src/plugins/qmljseditor/qmljscomponentfromobjectdef.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/qmljseditor/qmljscomponentfromobjectdef.cpp b/src/plugins/qmljseditor/qmljscomponentfromobjectdef.cpp index bbe1c5c3dde..0e929e46635 100644 --- a/src/plugins/qmljseditor/qmljscomponentfromobjectdef.cpp +++ b/src/plugins/qmljseditor/qmljscomponentfromobjectdef.cpp @@ -182,7 +182,9 @@ public: changeSet.apply(&newComponentSource); // stop if we can't create the new file - if (!refactoring.createFile(newFileName, newComponentSource)) + const bool reindent = true; + const bool openEditor = false; + if (!refactoring.createFile(newFileName, newComponentSource, reindent, openEditor)) return; if (path == QFileInfo(currentFileName).path()) {