From 9237504b3308e94462fe90fa4595bc603c22f951 Mon Sep 17 00:00:00 2001 From: Johannes Hofmann Date: Thu, 10 Nov 2005 21:06:50 +0100 Subject: disable track width slider until a track is loaded --- src/gipfel.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/gipfel.cxx b/src/gipfel.cxx index 14f4418..c92063b 100644 --- a/src/gipfel.cxx +++ b/src/gipfel.cxx @@ -93,7 +93,9 @@ void open_cb() { void track_cb() { char *file = fl_file_chooser("Track File?", NULL, NULL); - gipf->load_track(file); + if (gipf->load_track(file) == 0) { + s_track_width->activate(); + } } void save_cb() { @@ -268,7 +270,7 @@ create_control_window() { s_track_width->slider(FL_UP_BOX); s_track_width->callback((Fl_Callback*)track_width_cb); s_track_width->align(FL_ALIGN_TOP); - + s_track_width->deactivate(); // Viewpoint Stuff b_viewpoint = new Fl_Box(FL_DOWN_BOX, 30, 255, 300, 80, ""); -- cgit v1.2.3