Changeset 477
- Timestamp:
- Dec 4, 2009 5:06:49 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/liveplot
- Property rcs:date changed from 2001/10/31 20:02:37 to 2001/10/31 20:04:21
- Property rcs:lines changed from +59 -2 to +54 -34
- Property rcs:rev changed from 1.21 to 1.22
r476 r477 1721 1721 1722 1722 # fill the histogram menu 1723 if {[llength $expmap(powderlist)] > 1} { 1723 if {[llength $expmap(powderlist)] > 15} { 1724 set expgui(plotlist) {} 1724 1725 .a.file.menu entryconfigure Histogram -state normal 1725 1726 menu .a.file.menu.hist 1726 if {[llength $expmap(powderlist)] > 15} { 1727 set i 0 1728 foreach num [lsort -integer $expmap(powderlist)] { 1729 incr i 1730 # for now include, but disable histograms 1731 set state disabled 1732 if {[string range $expmap(htype_$num) 3 3] != "*"} { 1733 set state normal 1734 } 1735 if {$i == 1} { 1736 set num1 $num 1737 menu .a.file.menu.hist.$num1 1738 } 1739 .a.file.menu.hist.$num1 add radiobutton -label $num -value $num \ 1740 -variable hst -state $state \ 1741 -command {set cycle [getcycle];readdata .g} 1742 if {$i >= 10} { 1743 set i 0 1744 .a.file.menu.hist add cascade -label "$num1-$num" \ 1745 -menu .a.file.menu.hist.$num1 1746 } 1747 } 1748 if {$i != 0} { 1727 set i 0 1728 foreach num [lsort -integer $expmap(powderlist)] { 1729 incr i 1730 # for now include, but disable histograms 1731 set state disabled 1732 if {[string range $expmap(htype_$num) 3 3] != "*"} { 1733 set state normal 1734 lappend expgui(plotlist) $num 1735 } 1736 if {$i == 1} { 1737 set num1 $num 1738 menu .a.file.menu.hist.$num1 1739 } 1740 .a.file.menu.hist.$num1 add radiobutton -label $num -value $num \ 1741 -variable hst -state $state \ 1742 -command {set cycle [getcycle];readdata .g} 1743 if {$i >= 10} { 1744 set i 0 1749 1745 .a.file.menu.hist add cascade -label "$num1-$num" \ 1750 1746 -menu .a.file.menu.hist.$num1 1751 1747 } 1752 } else { 1753 foreach num [lsort -integer $expmap(powderlist)] { 1754 # for now include, but disable unprocessed histograms 1755 set state disabled 1756 if {[string range $expmap(htype_$num) 3 3] != "*"} { 1757 set state normal 1758 } 1759 .a.file.menu.hist add radiobutton -label $num -value $num \ 1760 -variable hst -state $state \ 1761 -command {set cycle [getcycle];readdata .g} 1762 } 1763 } 1764 } 1765 1748 } 1749 if {$i != 0} { 1750 .a.file.menu.hist add cascade -label "$num1-$num" \ 1751 -menu .a.file.menu.hist.$num1 1752 } 1753 } elseif {[llength $expmap(powderlist)] > 1} { 1754 set expgui(plotlist) {} 1755 .a.file.menu entryconfigure Histogram -state normal 1756 menu .a.file.menu.hist 1757 foreach num [lsort -integer $expmap(powderlist)] { 1758 # for now include, but disable unprocessed histograms 1759 set state disabled 1760 if {[string range $expmap(htype_$num) 3 3] != "*"} { 1761 set state normal 1762 lappend expgui(plotlist) $num 1763 } 1764 .a.file.menu.hist add radiobutton -label $num -value $num \ 1765 -variable hst -state $state \ 1766 -command {set cycle [getcycle];readdata .g} 1767 } 1768 } else { 1769 set expgui(plotlist) [lindex $expmap(powderlist) 0] 1770 } 1771 # N = load next histogram 1772 bind . <Key-n> { 1773 set i [lsearch $expgui(plotlist) $hst] 1774 incr i 1775 if {$i >= [llength $expgui(plotlist)]} {set i 0} 1776 set hst [lindex $expgui(plotlist) $i] 1777 set cycle [getcycle];readdata .g 1778 } 1779 bind . <Key-N> { 1780 set i [lsearch $expgui(plotlist) $hst] 1781 incr i 1782 if {$i >= [llength $expgui(plotlist)]} {set i 0} 1783 set hst [lindex $expgui(plotlist) $i] 1784 set cycle [getcycle];readdata .g 1785 } 1766 1786 updateifnew 1767 1787 donewaitmsg
Note: See TracChangeset
for help on using the changeset viewer.