diff options
Diffstat (limited to 'iup/srccontrols/iup_oldval.c')
-rwxr-xr-x | iup/srccontrols/iup_oldval.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/iup/srccontrols/iup_oldval.c b/iup/srccontrols/iup_oldval.c index 50dae8a..9c14c90 100755 --- a/iup/srccontrols/iup_oldval.c +++ b/iup/srccontrols/iup_oldval.c @@ -533,7 +533,7 @@ static char* iValGetTypeAttrib(Ihandle* ih) static char* iValGetValueAttrib(Ihandle* ih) { char* str = iupStrGetMemory(20); - sprintf(str, "%f", ih->data->val); + sprintf(str, "%g", ih->data->val); return str; } @@ -576,7 +576,7 @@ static int iValSetStepAttrib(Ihandle* ih, const char* step) static char* iValGetStepAttrib(Ihandle* ih) { char* str = iupStrGetMemory(20); - sprintf(str, "%f", ih->data->step); + sprintf(str, "%g", ih->data->step); return str; } @@ -590,7 +590,7 @@ static int iValSetPageStepAttrib(Ihandle* ih, const char* pagestep) static char* iValGetPageStepAttrib(Ihandle* ih) { char* str = iupStrGetMemory(20); - sprintf(str, "%f", ih->data->pagestep); + sprintf(str, "%g", ih->data->pagestep); return str; } @@ -605,7 +605,7 @@ static int iValSetMaxAttrib(Ihandle* ih, const char* max) static char* iValGetMaxAttrib(Ihandle* ih) { char* str = iupStrGetMemory(20); - sprintf(str, "%f", ih->data->vmax); + sprintf(str, "%g", ih->data->vmax); return str; } @@ -620,7 +620,7 @@ static int iValSetMinAttrib(Ihandle* ih, const char* min) static char* iValGetMinAttrib(Ihandle* ih) { char* str = iupStrGetMemory(20); - sprintf(str, "%f", ih->data->vmin); + sprintf(str, "%g", ih->data->vmin); return str; } @@ -719,10 +719,16 @@ static int iValMapMethod(Ihandle* ih) static void iValUnMapMethod(Ihandle* ih) { if (ih->data->cddbuffer) + { cdKillCanvas(ih->data->cddbuffer); + ih->data->cddbuffer = NULL; + } if (ih->data->cdcanvas) + { cdKillCanvas(ih->data->cdcanvas); + ih->data->cdcanvas = NULL; + } } static void iValDestroyMethod(Ihandle* ih) |