From 7b33f84121c2b94ddd4a0ccae7130bb18c8cf39d Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Mon, 27 May 2002 21:54:11 +0000 Subject: Don't use %g when step == 1.0. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2262 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- CHANGES | 2 ++ src/Fl_Valuator.cxx | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGES b/CHANGES index 93ce6f431..345178600 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,8 @@ CHANGES IN FLTK 1.1.0rc3 - Documentation updates. + - Fixed Fl_Valuator::format() so that the correct format + type is used when step == 1.0. - Fl_Help_View didn't support the TT markup. - Fl_Shared_Image used a double-pointer to the image handler functions, which was unnecessary and diff --git a/src/Fl_Valuator.cxx b/src/Fl_Valuator.cxx index 4ee6f2c8e..1b19a168b 100644 --- a/src/Fl_Valuator.cxx +++ b/src/Fl_Valuator.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Valuator.cxx,v 1.5.2.4.2.1 2002/01/01 15:11:31 easysw Exp $" +// "$Id: Fl_Valuator.cxx,v 1.5.2.4.2.2 2002/05/27 21:54:11 easysw Exp $" // // Valuator widget for the Fast Light Tool Kit (FLTK). // @@ -115,7 +115,7 @@ double Fl_Valuator::increment(double v, int n) { int Fl_Valuator::format(char* buffer) { double v = value(); - if (!A || B==1) return sprintf(buffer, "%g", v); + if (!A) return sprintf(buffer, "%g", v); int i, x; for (x = 10, i = 2; x < B; x *= 10) i++; if (x == B) i--; @@ -123,5 +123,5 @@ int Fl_Valuator::format(char* buffer) { } // -// End of "$Id: Fl_Valuator.cxx,v 1.5.2.4.2.1 2002/01/01 15:11:31 easysw Exp $". +// End of "$Id: Fl_Valuator.cxx,v 1.5.2.4.2.2 2002/05/27 21:54:11 easysw Exp $". // -- cgit v1.2.3