Fl_Value_Input did not update if the value was changed from inside the
callback for another Fl_Value_Input. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@592 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
8abc94ba07
commit
c951750611
@ -1,5 +1,5 @@
|
||||
//
|
||||
// "$Id: Fl_Value_Input.cxx,v 1.6 1999/03/07 08:51:44 bill Exp $"
|
||||
// "$Id: Fl_Value_Input.cxx,v 1.6.2.1 1999/05/20 18:01:41 bill Exp $"
|
||||
//
|
||||
// Value input widget for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
@ -32,14 +32,14 @@
|
||||
#include <FL/Fl_Group.H>
|
||||
#include <stdlib.h>
|
||||
|
||||
static char hack_o_rama;
|
||||
static Fl_Value_Input* hack_o_rama;
|
||||
|
||||
void Fl_Value_Input::input_cb(Fl_Widget*, void* v) {
|
||||
Fl_Value_Input& t = *(Fl_Value_Input*)v;
|
||||
double nv;
|
||||
if (t.step()>=1.0) nv = strtol(t.input.value(), 0, 0);
|
||||
else nv = strtod(t.input.value(), 0);
|
||||
hack_o_rama = 1;
|
||||
hack_o_rama = &t;
|
||||
t.handle_push();
|
||||
t.handle_drag(nv);
|
||||
t.handle_release();
|
||||
@ -60,7 +60,7 @@ void Fl_Value_Input::resize(int X, int Y, int W, int H) {
|
||||
}
|
||||
|
||||
void Fl_Value_Input::value_damage() {
|
||||
if (hack_o_rama) return;
|
||||
if (hack_o_rama==this) return;
|
||||
char buf[128];
|
||||
format(buf);
|
||||
input.value(buf);
|
||||
@ -127,5 +127,5 @@ Fl_Value_Input::Fl_Value_Input(int x, int y, int w, int h, const char* l)
|
||||
}
|
||||
|
||||
//
|
||||
// End of "$Id: Fl_Value_Input.cxx,v 1.6 1999/03/07 08:51:44 bill Exp $".
|
||||
// End of "$Id: Fl_Value_Input.cxx,v 1.6.2.1 1999/05/20 18:01:41 bill Exp $".
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user