changeset 20121:23fb65b45d8c

do not call custom editor at startup and when debugging (bug #44701) * file-editor.cc (call_custom_editor): return with true but without opening a file; (empty_script): do not open an empty script in the cutom editor at startup
author Torsten <ttl@justmail.de>
date Fri, 17 Apr 2015 19:55:24 +0200
parents c58cf3a65519
children 0cf104d3371f
files libgui/src/m-editor/file-editor.cc
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libgui/src/m-editor/file-editor.cc	Fri Apr 17 14:07:00 2015 -0400
+++ b/libgui/src/m-editor/file-editor.cc	Fri Apr 17 19:55:24 2015 +0200
@@ -272,6 +272,9 @@
 
   if (settings->value ("useCustomFileEditor",false).toBool ())
     {
+      if (line > -1)  // check for a specific line (debugging)
+        return true;  // yes: do ont open a file in external editor
+
       QString editor = settings->value ("customFileEditor").toString ();
       editor.replace ("%f", file_name);
       editor.replace ("%l", QString::number (line));
@@ -1916,6 +1919,10 @@
 void
 file_editor::empty_script (bool startup, bool visible)
 {
+  QSettings *settings = resource_manager::get_settings ();
+  if (settings->value ("useCustomFileEditor",false).toBool ())
+    return;  // do not open an empty script in the external editor
+
   bool real_visible;
 
   if (startup)