diff libgui/src/settings-dialog.cc @ 25622:a7ee69d23f32

add a gui preference for opening files when debugging in console (bug #49119) * gui-preferences.h: new const struct for this preference * file-editor.cc: include gui-preferences.h; (request_open_file): give editor tab of related file the focus only if it is desired to open editor files, do not open a closed file when inserting a breakpoint or update the debug pointer, never open a closed file when removing a breakpoint; * settings-dialog.cc (settings_dialog): initialize the new checkbox from the preferences file; (write_changed_settings): store checkbox state into the preferences file; * settings-dialog.ui: add new debugging section in editor tab with checkbox for opening files when debugging from console window
author Torsten <mttl@mailbox.org>
date Sun, 15 Jul 2018 11:56:04 +0200
parents 44d638d5eea5
children afab7be1466a
line wrap: on
line diff
--- a/libgui/src/settings-dialog.cc	Sat Jul 14 22:48:02 2018 -0700
+++ b/libgui/src/settings-dialog.cc	Sun Jul 15 11:56:04 2018 +0200
@@ -508,6 +508,7 @@
   ui->editor_create_new_file->setChecked (settings->value ("editor/create_new_file", false).toBool ());
   ui->editor_reload_changed_files->setChecked (settings->value ("editor/always_reload_changed_files", false).toBool ());
   ui->editor_hiding_closes_files->setChecked (settings->value ("editor/hiding_closes_files", false).toBool ());
+  ui->editor_show_dbg_file->setChecked (settings->value (ed_show_dbg_file.key, ed_show_dbg_file.def).toBool ());
 
   // terminal
   ui->terminal_fontName->setCurrentFont (QFont (settings->value ("terminal/fontName", "Courier New").toString ()));
@@ -883,6 +884,8 @@
   settings->setValue ("editor/create_new_file", ui->editor_create_new_file->isChecked ());
   settings->setValue ("editor/hiding_closes_files", ui->editor_hiding_closes_files->isChecked ());
   settings->setValue ("editor/always_reload_changed_files", ui->editor_reload_changed_files->isChecked ());
+  settings->setValue (ed_show_dbg_file.key, ui->editor_show_dbg_file->isChecked ());
+
   settings->setValue ("terminal/fontSize", ui->terminal_fontSize->value ());
   settings->setValue ("terminal/fontName", ui->terminal_fontName->currentFont ().family ());