Changeset 6317 for branches


Ignore:
Timestamp:
May 5, 2016, 9:24:05 PM (8 years ago)
Author:
dkearney
Message:

fix multichoice widget to return the value string for chosen labels, if available, instead of returning the label.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/multichoice/gui/scripts/multichoiceentry.tcl

    r6251 r6317  
    122122    # Query the value and return.
    123123    #
     124    set result ""
    124125    set str [$itk_component(choice) value]
    125     if {[info exists _str2val($str)]} {
    126         return $_str2val($str)
    127     }
    128     return $str
     126    regsub -all {, } $str {,} str
     127    foreach lbl [split $str {,}] {
     128        if {[info exists _str2val($lbl)]} {
     129            set lbl $_str2val($lbl)
     130        }
     131        lappend result $lbl
     132    }
     133    return [join $result {, }]
    129134}
    130135
Note: See TracChangeset for help on using the changeset viewer.