summaryrefslogtreecommitdiffstats
path: root/src/tools/g2
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2017-12-14 17:21:36 -0500
committerDave Barach <dave@barachs.net>2017-12-14 17:22:16 -0500
commita4bab9d5dcdba4ad45ec3c38e43f8b96e664f653 (patch)
tree0a76fc8c550a8534ab4b79083610b19ad8ac142b /src/tools/g2
parent1b708845633f7ddb816f81aed82f55fd9522fbcf (diff)
Fix display of single-event event-logs
Change-Id: Ib3e25916c66fa3e1b082359095652c45d3b27d0f Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/tools/g2')
-rw-r--r--src/tools/g2/g2version.c2
-rw-r--r--src/tools/g2/view1.c7
2 files changed, 8 insertions, 1 deletions
diff --git a/src/tools/g2/g2version.c b/src/tools/g2/g2version.c
index 4b6f9313fee..ef3d036c6d5 100644
--- a/src/tools/g2/g2version.c
+++ b/src/tools/g2/g2version.c
@@ -16,4 +16,4 @@
const char *version_string = "G2 (x86_64 GNU/Linux) major version 3.0";
const char *minor_v_string =
- "Built Wed Feb 3 10:58:12 EST 2016";
+ "Changed Thu Dec 14 17:18:36 EST 2017";
diff --git a/src/tools/g2/view1.c b/src/tools/g2/view1.c
index c5f799dc0bc..a4190cb1f27 100644
--- a/src/tools/g2/view1.c
+++ b/src/tools/g2/view1.c
@@ -2128,6 +2128,10 @@ static void view1_button_click_callback(GtkButton *item, gpointer data)
g_events[g_nevents-1].time * 9) {
s_v1->minvistime = 0;
s_v1->maxvistime = g_events[g_nevents-1].time * 9 / 8;
+ /* Single event? Make window 1s wide... */
+ if (g_nevents == 1)
+ s_v1->maxvistime = 1000000;
+
}
recompute_hscrollbar();
break;
@@ -2967,6 +2971,9 @@ void view1_read_events_callback(void)
s_v1->minvistime = 0LL;
s_v1->maxvistime = (g_events[g_nevents - 1].time * 9)/ 8;
+ /* Single event? Make the initial display 1s wide */
+ if (g_nevents == 1)
+ s_v1->maxvistime = 1000000;
s_srchindex = 0;
s_srchcode = 0;
s_last_selected_event = 0;