Changeset 82 for trunk


Ignore:
Timestamp:
Oct 4, 2005 5:25:14 PM (18 years ago)
Author:
mmc
Message:

Fixed the device viewer to work properly even with
<units>arbitrary</units>. Also, fixed Controls so
that you can use a <separator> to break up a group
of groups and have it render as a flat list of groups
rather than a series of tabs.

Location:
trunk/gui/scripts
Files:
3 edited

Legend:

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

    r56 r82  
    7272    #
    7373    set str [$_owner xml get $path.default]
    74     if {"" != $str != ""} { $itk_component(switch) value $str }
     74    if {"" != $str} {
     75        $itk_component(switch) value $str
     76    } else {
     77        $itk_component(switch) value off
     78    }
    7579}
    7680
  • trunk/gui/scripts/controls.tcl

    r74 r82  
    299299            set w $_name2info($name-value)
    300300
    301             if {[winfo class $w] != "GroupEntry"} {
     301            if {$w == "--" || [winfo class $w] != "GroupEntry"} {
    302302                # something other than a group? then fall back on hlabels
    303303                set scheme hlabels
     
    382382                }
    383383
    384                 set frame [winfo parent $wv]
    385                 grid rowconfigure $frame $row -weight 0
    386                 grid rowconfigure $frame $row -weight 0
     384                grid rowconfigure $_frame $row -weight 0
     385                grid rowconfigure $_frame $row -weight 0
    387386
    388387                switch -- [winfo class $wv] {
     
    391390                            grid $wl -sticky n -pady 4
    392391                            grid $wv -sticky nsew
    393                             grid rowconfigure $frame $row -weight 1
    394                             grid columnconfigure $frame 1 -weight 1
     392                            grid rowconfigure $_frame $row -weight 1
     393                            grid columnconfigure $_frame 1 -weight 1
    395394                        }
    396395                    }
     
    399398                    }
    400399                }
    401                 grid columnconfigure $frame 1 -weight 1
     400                grid columnconfigure $_frame 1 -weight 1
    402401            } elseif {$wv == "--"} {
    403                 grid rowconfigure $frame $row -minsize 10
     402                grid rowconfigure $_frame $row -minsize 10
    404403            }
    405404
    406405            incr row
    407             grid rowconfigure [winfo parent $w] $row \
    408                 -minsize $itk_option(-padding)
     406            grid rowconfigure $_frame $row -minsize $itk_option(-padding)
    409407            incr row
    410408        }
  • trunk/gui/scripts/deviceViewer1D.tcl

    r69 r82  
    325325
    326326    foreach {zmin zmax} [$itk_component(layout) limits] { break }
     327    if {$zmin != "" && $zmin < $zmax} {
     328        $graph axis configure x -min $zmin -max $zmax
     329    }
     330
    327331    if {$_device != ""} {
    328332        set units [$_device get units]
    329         if {$units != "arbitrary" && $zmax > $zmin} {
    330             $graph axis configure x -hide no -min $zmin -max $zmax \
    331                 -title "Position ($units)"
     333        if {$units != "arbitrary"} {
     334            $graph axis configure x -hide no -title "Position ($units)"
    332335        } else {
    333336            $graph axis configure x -hide yes
    334337        }
    335338    } else {
    336         $graph axis configure x -hide no -min $zmin -max $zmax \
    337             -title "Position"
     339        $graph axis configure x -hide no -title "Position"
    338340    }
    339341
Note: See TracChangeset for help on using the changeset viewer.