summaryrefslogtreecommitdiffstats
path: root/src/tools/g2/view1.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/g2/view1.c')
-rw-r--r--src/tools/g2/view1.c7
1 files changed, 7 insertions, 0 deletions
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;