Changeset 551 for trunk


Ignore:
Timestamp:
Dec 7, 2006, 4:34:00 AM (18 years ago)
Author:
dkearney
Message:

fix for rappture ticket #168. added new format for inputs that have min or max checks but do no do units conversions. currently only integer inputs fit this category. the new format commands account for when the user enters a value like 0600 for an input that has a max value of 500

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/scripts/gauge.tcl

    r550 r551  
    233233                set convMinVal [Rappture::Units::convert \
    234234                    $itk_option(-minvalue) -to $nvUnits]
     235            } else {
     236                # fix for the case when the user tries to
     237                # compare values like minv=-500 nv=-0600
     238                set nv [format "%f" $nv]
     239                set minv [format "%f" $minv]
    235240            }
    236241            if {$nv < $minv} {
     
    246251                set convMaxVal [Rappture::Units::convert \
    247252                    $itk_option(-maxvalue) -to $nvUnits]
     253            } else {
     254                # fix for the case when the user tries to
     255                # compare values like maxv=500 nv=0600
     256                set nv [format "%f" $nv]
     257                set minv [format "%f" $minv]
    248258            }
    249259            if {$nv > $maxv} {
Note: See TracChangeset for help on using the changeset viewer.