[gnome-builder/wip/chergert/bug1: 27/69] debugger: only clear debugger when new instance is set
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/chergert/bug1: 27/69] debugger: only clear debugger when new instance is set
- Date: Sat, 2 Sep 2017 02:04:02 +0000 (UTC)
commit 0450d868c201cd6a12f18f7613363ef348e9bef1
Author: Christian Hergert <chergert redhat com>
Date: Mon Aug 28 12:25:17 2017 -0700
debugger: only clear debugger when new instance is set
If we are clearing the old debugger because it ended, keep the log alive
for the user to potentially glean some insight.
libide/debugger/ide-debugger-perspective.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/libide/debugger/ide-debugger-perspective.c b/libide/debugger/ide-debugger-perspective.c
index 9223b8f..e8ae7fe 100644
--- a/libide/debugger/ide-debugger-perspective.c
+++ b/libide/debugger/ide-debugger-perspective.c
@@ -136,8 +136,14 @@ ide_debugger_perspective_set_debugger (IdeDebuggerPerspective *self,
if (g_set_object (&self->debugger, debugger))
{
+ /* Clear the log if this is a new debugger instance,
+ * otherwise allow the user to read the backlog in case
+ * there was something useful for debugging.
+ */
+ if (debugger != NULL)
+ gtk_text_buffer_set_text (self->log_buffer, "", 0);
+
dzl_signal_group_set_target (self->debugger_signals, debugger);
- gtk_text_buffer_set_text (self->log_buffer, "", 0);
g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_DEBUGGER]);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]