diff --git a/src/Fl_Browser_.cxx b/src/Fl_Browser_.cxx index fbbc3bfa5..03bbc700f 100644 --- a/src/Fl_Browser_.cxx +++ b/src/Fl_Browser_.cxx @@ -3,7 +3,7 @@ // // Base Browser widget class for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2010 by Bill Spitzak and others. +// Copyright 1998-2016 by Bill Spitzak and others. // // This library is free software. Distribution and use rights are outlined in // the file "COPYING" which should have been included with this file. If this @@ -714,9 +714,10 @@ int Fl_Browser_::handle(int event) { if (type()==FL_HOLD_BROWSER) { switch (Fl::event_key()) { case FL_Down: - while ((l = item_next(l))) - if (item_height(l)>0) {select_only(l, when()); break;} - return 1; + while ((l = item_next(l))) { + if (item_height(l)>0) {select_only(l, when()); break;} + } + return 1; case FL_Up: while ((l = item_prev(l))) { if (item_height(l)>0) { diff --git a/src/Fl_Clock.cxx b/src/Fl_Clock.cxx index 3926ec1b7..43fc45053 100644 --- a/src/Fl_Clock.cxx +++ b/src/Fl_Clock.cxx @@ -38,10 +38,14 @@ static void drawhand(double ang,const float v[][2],Fl_Color fill,Fl_Color line) { fl_push_matrix(); fl_rotate(ang); - fl_color(fill); fl_begin_polygon(); - int i; for (i=0; i<4; i++) fl_vertex(v[i][0],v[i][1]); fl_end_polygon(); - fl_color(line); fl_begin_loop(); - for (i=0; i<4; i++) fl_vertex(v[i][0],v[i][1]); fl_end_loop(); + fl_color(fill); + fl_begin_polygon(); + int i; for (i=0; i<4; i++) fl_vertex(v[i][0],v[i][1]); + fl_end_polygon(); + fl_color(line); + fl_begin_loop(); + for (i=0; i<4; i++) fl_vertex(v[i][0],v[i][1]); + fl_end_loop(); fl_pop_matrix(); } diff --git a/src/Fl_Table.cxx b/src/Fl_Table.cxx index b5fecc0d1..b1779a752 100644 --- a/src/Fl_Table.cxx +++ b/src/Fl_Table.cxx @@ -491,14 +491,14 @@ void Fl_Table::recalc_dimensions() { int scrollsize = Fl::scrollbar_size(); #endif // Second pass: Check for interference - if ( !hideh & hidev ) { hidev = (( table_h - tih + scrollsize ) <= 0 ); } - if ( !hidev & hideh ) { hideh = (( table_w - tiw + scrollsize ) <= 0 ); } + if ( !hideh && hidev ) { hidev = (( table_h - tih + scrollsize ) <= 0 ); } + if ( !hidev && hideh ) { hideh = (( table_w - tiw + scrollsize ) <= 0 ); } // Determine scrollbar visibility, trim ti[xywh]/to[xywh] - if ( hidev ) { vscrollbar->hide(); } + if ( hidev ) { vscrollbar->hide(); } else { vscrollbar->show(); tiw -= scrollsize; tow -= scrollsize; } - if ( hideh ) { hscrollbar->hide(); } + if ( hideh ) { hscrollbar->hide(); } else { hscrollbar->show(); tih -= scrollsize; toh -= scrollsize; } - } + } // Resize the child table table->resize(tox, toy, tow, toh); table->init_sizes(); diff --git a/test/fracviewer.cxx b/test/fracviewer.cxx index a6450eb87..7de159757 100644 --- a/test/fracviewer.cxx +++ b/test/fracviewer.cxx @@ -483,8 +483,9 @@ static void normalize(GLfloat v[3]) if (d == 0) fprintf(stderr, "Zero length vector in normalize\n"); - else + else { v[0] /= d; v[1] /= d; v[2] /= d; + } } /* calculates a normalized crossproduct to v1, v2 */