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
This commit is contained in:
parent
3e74cc34ec
commit
7b33f84121
2
CHANGES
2
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
|
||||
|
@ -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 $".
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user