Changeset 451


Ignore:
Timestamp:
Dec 4, 2009 5:06:23 PM (14 years ago)
Author:
toby
Message:

# on 2001/09/25 23:34:32, toby did:
list only allowed histograms on submenu

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/liveplot

    • Property rcs:date changed from 2001/09/04 22:53:53 to 2001/09/25 23:34:32
    • Property rcs:lines changed from +107 -52 to +48 -18
    • Property rcs:rev changed from 1.18 to 1.19
    r426 r451  
    14701470            -command plotdata
    14711471}
    1472 .a.file.menu add cascade -label "Histogram" -menu .a.file.menu.hist
    1473 menu .a.file.menu.hist
    1474 for {set num 1} {$num < 99} {incr num 10} {
    1475     .a.file.menu.hist add cascade -label "$num-[expr $num+9]" \
    1476             -menu .a.file.menu.hist.$num
    1477     menu .a.file.menu.hist.$num
    1478     for {set num1 $num} {$num1 < 10+$num} {incr num1} {
    1479         .a.file.menu.hist.$num add radiobutton -label $num1 -value $num1 \
    1480                 -variable hst \
    1481                 -command {set cycle [getcycle];readdata .g}
    1482     }
    1483 }
     1472.a.file.menu add cascade -label Histogram -menu .a.file.menu.hist -state disabled
    14841473.a.file.menu add command -label "Update Plot" \
    14851474        -command {set cycle [getcycle];readdata .g}
     
    16421631if [file exists $fl] {source $fl}
    16431632
    1644 if {$program == "bkgedit"}  {
    1645     expload $expnam.EXP
    1646     mapexp
    1647 
    1648 #    bkghstInit
    1649 }
     1633expload $expnam.EXP
     1634mapexp
     1635
     1636# fill the histogram menu
     1637if {[llength $expmap(powderlist)] > 1} {
     1638    .a.file.menu entryconfigure Histogram -state normal
     1639    menu .a.file.menu.hist
     1640    if {[llength $expmap(powderlist)] > 15} {
     1641        set i 0
     1642        foreach num [lsort -integer $expmap(powderlist)] {
     1643            incr i
     1644            # for now include, but disable histograms
     1645            set state disabled
     1646            if {[string range $expmap(htype_$num) 3 3] != "*"} {
     1647                set state normal
     1648            }
     1649            if {$i == 1} {
     1650                set num1 $num
     1651                menu .a.file.menu.hist.$num1
     1652            }
     1653            .a.file.menu.hist.$num1 add radiobutton -label $num -value $num \
     1654                    -variable hst -state $state \
     1655                    -command {set cycle [getcycle];readdata .g}
     1656            if {$i >= 10} {
     1657                set i 0
     1658                .a.file.menu.hist add cascade -label "$num1-$num" \
     1659                        -menu .a.file.menu.hist.$num1
     1660            }
     1661        }
     1662        if {$i != 0} {
     1663            .a.file.menu.hist add cascade -label "$num1-$num" \
     1664                    -menu .a.file.menu.hist.$num1
     1665        }
     1666    } else {
     1667        foreach num [lsort -integer $expmap(powderlist)] {
     1668            # for now include, but disable unprocessed histograms
     1669            set state disabled
     1670            if {[string range $expmap(htype_$num) 3 3] != "*"} {
     1671                set state normal
     1672            }
     1673            .a.file.menu.hist add radiobutton -label $num -value $num \
     1674                    -variable hst -state $state \
     1675                    -command {set cycle [getcycle];readdata .g}
     1676        }
     1677    }
     1678}
     1679
    16501680updateifnew
    16511681donewaitmsg
Note: See TracChangeset for help on using the changeset viewer.