summaryrefslogtreecommitdiff
path: root/src/gipfel.cxx
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2007-08-03 21:24:10 +0200
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2007-08-03 21:24:10 +0200
commit13cbcd631f4a66f3551bc3d95b67e58448512c8e (patch)
tree2640c3a7e6a3314011ad3ad273094a80b5935aac /src/gipfel.cxx
parentb4bf1d3f2265c9cc7809b759665b4223f783e00b (diff)
set scroll position to 0,0 when opening new image
Diffstat (limited to 'src/gipfel.cxx')
-rw-r--r--src/gipfel.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gipfel.cxx b/src/gipfel.cxx
index b15153d..16329c5 100644
--- a/src/gipfel.cxx
+++ b/src/gipfel.cxx
@@ -42,6 +42,7 @@ char *img_file;
char *data_file = DEFAULT_DATAFILE;
GipfelWidget *gipf = NULL;
+Fl_Scroll *scroll;
Fl_Window *control_win, *view_win;
Fl_Dial *s_center = NULL;
Fl_Slider *s_nick, *s_focal_length, *s_tilt, *s_height_dist, *s_track_width;
@@ -92,7 +93,9 @@ void open_cb() {
char *file = fl_file_chooser("Open File?", "*.jpg", img_file);
if(file != NULL) {
gipf->load_image(file);
+ scroll->position(0, 0);
view_win->label(file);
+ view_win->redraw();
control_win->label(file);
set_values();
}
@@ -411,8 +414,6 @@ int main(int argc, char** argv) {
double stitch_from = 0.0, stitch_to = 380.0;
double dist_k0 = 0.0, dist_k1 = 0.0, dist_x0 = 0.0;
char *outpath = "/tmp";
- Fl_Scroll *scroll;
-
err = 0;
while ((c = getopt(argc, argv, ":?d:v:sw:h:j:t:u:br:4")) != EOF) {